From 198ad4a2fc028a35b523c93f940932cfc923c81a Mon Sep 17 00:00:00 2001 From: newbyvector Date: Fri, 2 Feb 2024 18:03:52 +0800 Subject: [PATCH] fix: use observer cell for get latest outputs --- packages/libro-jupyter/src/components/cell-execution-tip.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/libro-jupyter/src/components/cell-execution-tip.tsx b/packages/libro-jupyter/src/components/cell-execution-tip.tsx index 2482a1cb..33c969a4 100644 --- a/packages/libro-jupyter/src/components/cell-execution-tip.tsx +++ b/packages/libro-jupyter/src/components/cell-execution-tip.tsx @@ -25,7 +25,7 @@ export function CellExecutionTip({ cell }: { cell: CellView }) { const [, setCurrentTime] = useState(); const observableCell = useObserve(cell); - if (!ExecutableCellView.is(cell)) { + if (!ExecutableCellView.is(observableCell)) { return null; } @@ -38,7 +38,7 @@ export function CellExecutionTip({ cell }: { cell: CellView }) { .kernelExecuting; const executionInfo = parseExecutionInfoFromModel(cell.model); - const output = cell.outputArea.outputs; + const output = observableCell.outputArea.outputs; const existOutput = output && output.length !== 0; const waitingExecute = isWaitingExecute(observableCell.model);