Skip to content

Commit

Permalink
fix(TreeTable): fix incorrect scrolling position of tree nodes after …
Browse files Browse the repository at this point in the history
…collapse (#462)
  • Loading branch information
simonguo authored Oct 17, 2023
1 parent 88b0575 commit 0e0c8dc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,9 @@ const Table = React.forwardRef(<Row extends RowDataType, Key>(props: TableProps<
setScrollX,
getTableHeight
} = useTableDimension({
data: dataProp,
// The data should be flattened,
// otherwise the array length required to calculate the scroll height in the TreeTable is not real.
data,
width: widthProp,
rowHeight,
tableRef,
Expand Down

0 comments on commit 0e0c8dc

Please sign in to comment.