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
  • Loading branch information
simonguo committed Oct 11, 2023
1 parent dc78cee commit b9df6f9
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 b9df6f9

Please sign in to comment.