Skip to content

Commit afb9298

Browse files
committed
don't open the cell panel until the cell has loaded
1 parent cb859c7 commit afb9298

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/components/ParquetView/ParquetView.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,14 @@ export default function ParquetView({ source, setProgress, setError }: ViewerPro
8282
if (cell?.col === col && cell.row === row) {
8383
return undefined
8484
}
85+
const columnName = content?.dataframe.header[col]
86+
if (columnName === undefined || !content?.dataframe.getCell({ row, column: columnName })) {
87+
// don't open the cell panel until it has loaded
88+
return undefined
89+
}
8590
return { row, col }
8691
})
87-
}, [])
92+
}, [content])
8893
const onDoubleClickCell = useCallback((_event: React.MouseEvent, col: number, row: number) => {
8994
toggleCell(col, row)
9095
}, [toggleCell])

0 commit comments

Comments
 (0)