Skip to content

Commit

Permalink
Add scores in popover in subforest table.
Browse files Browse the repository at this point in the history
  • Loading branch information
ryukzak committed Dec 30, 2023
1 parent 44f471f commit 71a01cb
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions web/src/components/SubforestTables/Columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,23 @@ export function objectiveColumn(scoresInfo: ScoresInfo): Column {
}

return (
<div style={{ padding: "7px 5px", height: "100%", backgroundColor: cellColor.toRgbaString() }}>
{row.original.score}
</div>
<OverlayTrigger
trigger={["hover", "focus"]}
key={row.original.sid}
placement="left"
overlay={
<Popover id={`popover-positioned-left`}>
<Popover.Title>Scores</Popover.Title>
<Popover.Content>
<pre>{JSON.stringify(row.original.scores, undefined, 2)}</pre>
</Popover.Content>
</Popover>
}
>
<div style={{ padding: "7px 5px", height: "100%", backgroundColor: cellColor.toRgbaString() }}>
{row.original.score}
</div>
</OverlayTrigger>
);
},
};
Expand Down

0 comments on commit 71a01cb

Please sign in to comment.