Skip to content

Commit

Permalink
improvements to selection handling (#819, #823); side panel only cons…
Browse files Browse the repository at this point in the history
…umes layout space when selected (#804)
  • Loading branch information
michaelquigley committed Jan 8, 2025
1 parent cba3b95 commit 70a1a43
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions ui100/src/ApiConsole.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,14 @@ const ApiConsole = ({ logout }: ApiConsoleProps) => {
}
}, [selectedNode]);

let wrappedSidePanel = sidePanel ? <Grid2 size={4}>{sidePanel}</Grid2> : null;

return (
<div>
<NavBar logout={logout} />
<Grid2 container spacing={2} columns={{ xs: 4, sm: 10, md: 12 }}>
<Grid2 size="grow">
{mainPanel}
</Grid2>
{wrappedSidePanel}
{sidePanel ? <Grid2 size={4}>{sidePanel}</Grid2> : null}
</Grid2>
</div>
);
Expand Down
1 change: 0 additions & 1 deletion ui100/src/TabularView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ const TabularView = () => {

useEffect(() => {
let sn = nodes.find(node => Object.keys(rowSelection).includes(node.id));
console.log("sn", sn);
updateSelectedNode(sn);
updateNodes(nodes.map(node => (sn && node.id === sn.id) ? { ...node, selected: true } : { ...node, selected: false }));
}, [rowSelection]);
Expand Down

0 comments on commit 70a1a43

Please sign in to comment.