feat: display table cell on robot meta id
This commit is contained in:
@@ -35,8 +35,9 @@ interface CollapsibleRowProps {
|
|||||||
currentLog: string;
|
currentLog: string;
|
||||||
abortRunHandler: () => void;
|
abortRunHandler: () => void;
|
||||||
runningRecordingName: string;
|
runningRecordingName: string;
|
||||||
|
urlRunId: string | null;
|
||||||
}
|
}
|
||||||
export const CollapsibleRow = ({ row, handleDelete, isOpen, currentLog, abortRunHandler, runningRecordingName }: CollapsibleRowProps) => {
|
export const CollapsibleRow = ({ row, handleDelete, isOpen, currentLog, abortRunHandler, runningRecordingName, urlRunId }: CollapsibleRowProps) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const [open, setOpen] = useState(isOpen);
|
const [open, setOpen] = useState(isOpen);
|
||||||
@@ -62,14 +63,18 @@ export const CollapsibleRow = ({ row, handleDelete, isOpen, currentLog, abortRun
|
|||||||
abortRunHandler();
|
abortRunHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setOpen(urlRunId === row.runId || isOpen);
|
||||||
|
}, [urlRunId, row.runId, isOpen]);
|
||||||
|
|
||||||
const handleRowExpand = () => {
|
const handleRowExpand = () => {
|
||||||
const newOpen = !open;
|
const newOpen = !open;
|
||||||
setOpen(newOpen);
|
setOpen(newOpen);
|
||||||
if (newOpen) {
|
navigate(
|
||||||
navigate(`/runs/${row.robotMetaId}/run/${row.runId}`);
|
newOpen
|
||||||
} else {
|
? `/runs/${row.robotMetaId}/run/${row.runId}`
|
||||||
navigate(`/runs/${row.robotMetaId}`);
|
: `/runs/${row.robotMetaId}`
|
||||||
}
|
);
|
||||||
//scrollToLogBottom();
|
//scrollToLogBottom();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user