Skip to content

Commit

Permalink
fix (table): selectedRows remain unchanged when dataSource changes (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
truongtv22 authored Jun 6, 2024
1 parent 7026085 commit 5179535
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/table/src/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ const ProTable = <

const selectedRows = useMemo(
() => selectedRowKeys?.map((key) => preserveRecordsRef.current?.get(key)),
[selectedRowKeys],
[action.dataSource, selectedRowKeys],
) as T[];

/** 内置的工具栏 */
Expand Down

0 comments on commit 5179535

Please sign in to comment.