(null);
let showVisualizer = true;
const handleKeyPress = useCallback((event) => {
@@ -135,10 +135,12 @@ const ApiConsole = ({ logout }: ApiConsoleProps) => {
break;
}
} else {
- setSidePanel(<>>);
+ setSidePanel(null);
}
}, [selectedNode]);
+ let wrappedSidePanel = sidePanel ? {sidePanel} : null;
+
return (
@@ -146,9 +148,7 @@ const ApiConsole = ({ logout }: ApiConsoleProps) => {
{mainPanel}
-
- {sidePanel}
-
+ {wrappedSidePanel}
);
diff --git a/ui100/src/TabularView.tsx b/ui100/src/TabularView.tsx
index 2dba19d5..3db28c78 100644
--- a/ui100/src/TabularView.tsx
+++ b/ui100/src/TabularView.tsx
@@ -11,6 +11,7 @@ import {Node} from "@xyflow/react";
const TabularView = () => {
const nodes = useStore((state) => state.nodes);
+ const updateNodes = useStore((state) => state.updateNodes);
const selectedNode = useStore((state) => state.selectedNode);
const updateSelectedNode = useStore((state) => state.updateSelectedNode);
const [rowSelection, setRowSelection] = useState({});
@@ -25,7 +26,9 @@ 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]);
const columns = useMemo[]>(
@@ -52,7 +55,12 @@ const TabularView = () => {
state: { rowSelection },
muiTableBodyRowProps: ({ row }) => ({
onClick: () => {
- setRowSelection({[row.id]: true})
+ if(rowSelection[row.id]) {
+ setRowSelection({});
+ } else {
+ setRowSelection({[row.id]: true});
+ }
+
},
selected: rowSelection[row.id],
sx: {