feat: navigate to robot run list on expand close
This commit is contained in:
@@ -66,12 +66,13 @@ export const CollapsibleRow = ({ row, handleDelete, isOpen, currentLog, abortRun
|
|||||||
const newOpen = !open;
|
const newOpen = !open;
|
||||||
setOpen(newOpen);
|
setOpen(newOpen);
|
||||||
if (newOpen) {
|
if (newOpen) {
|
||||||
// Navigate to default tab (data) when expanding
|
|
||||||
navigate(`/runs/${row.robotMetaId}/run/${row.runId}`);
|
navigate(`/runs/${row.robotMetaId}/run/${row.runId}`);
|
||||||
|
} else {
|
||||||
|
navigate(`/runs/${row.robotMetaId}`);
|
||||||
}
|
}
|
||||||
scrollToLogBottom();
|
scrollToLogBottom();
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
scrollToLogBottom();
|
scrollToLogBottom();
|
||||||
}, [currentLog])
|
}, [currentLog])
|
||||||
|
|||||||
Reference in New Issue
Block a user