Skip to content

Commit 0e0c8dc

Browse files
authored
fix(TreeTable): fix incorrect scrolling position of tree nodes after collapse (#462)
1 parent 88b0575 commit 0e0c8dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Table.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,9 @@ const Table = React.forwardRef(<Row extends RowDataType, Key>(props: TableProps<
417417
setScrollX,
418418
getTableHeight
419419
} = useTableDimension({
420-
data: dataProp,
420+
// The data should be flattened,
421+
// otherwise the array length required to calculate the scroll height in the TreeTable is not real.
422+
data,
421423
width: widthProp,
422424
rowHeight,
423425
tableRef,

0 commit comments

Comments
 (0)