diff --git a/src/hooks/useVirtualScroll.ts b/src/hooks/useVirtualScroll.ts index 617e8e669f..b219ea58a3 100644 --- a/src/hooks/useVirtualScroll.ts +++ b/src/hooks/useVirtualScroll.ts @@ -179,7 +179,7 @@ const useVirtualScroll = (container: MutableRefObject, params: UseV }, 1); }, // eslint-disable-next-line - [container, data, tScroll, isVirtualScroll], + [container, data, tScroll, isVirtualScroll, startAndEndIndex, trHeightList, tripleBufferSize], ); return { diff --git a/src/table/hooks/useTreeDataExpand.ts b/src/table/hooks/useTreeDataExpand.ts index 9afa47b1ed..c260807137 100644 --- a/src/table/hooks/useTreeDataExpand.ts +++ b/src/table/hooks/useTreeDataExpand.ts @@ -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); }