Skip to content

Commit

Permalink
fix(table): virtual scroll table can not expand tree nodes (#2659)
Browse files Browse the repository at this point in the history
* fix(table): fix virtual scroll table can not expand tree nodes

* fix(table): container
  • Loading branch information
chaishi authored Dec 12, 2023
1 parent 540df37 commit 14cef8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/hooks/useVirtualScroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ const useVirtualScroll = (container: MutableRefObject<HTMLElement>, params: UseV
}, 1);
},
// eslint-disable-next-line
[container, data, tScroll, isVirtualScroll],
[container, data, tScroll, isVirtualScroll, startAndEndIndex, trHeightList, tripleBufferSize],
);

return {
Expand Down
2 changes: 1 addition & 1 deletion src/table/hooks/useTreeDataExpand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export function useTreeDataExpand(
if (changedExpandTreeNode.type === 'user-reaction-change') {
const { row, rowIndex } = changedExpandTreeNode || {};
const newData = store.toggleExpandData({ row, rowIndex }, dataSource, rowDataKeys);
setDataSource(newData);
setDataSource([...newData]);
} else if (changedExpandTreeNode.type === 'props-change') {
updateExpandState(dataSource, tExpandedTreeNode, oldExpandedTreeNode);
}
Expand Down

0 comments on commit 14cef8a

Please sign in to comment.