fix: record picker not displaying selected items when selecting across pages (#5770)

This commit is contained in:
Katherine 2024-12-03 09:45:23 +08:00 committed by GitHub
parent f1ffc114f4
commit ac995c4eaf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,6 +51,9 @@ export const useTableSelectorProps = () => {
rowKey,
rowSelection: {
type: multiple ? 'checkbox' : 'radio',
selectedRowKeys: rcSelectRows
?.filter((item) => options.every((row) => row[rowKey] !== item[rowKey]))
.map((item) => item[rowKey]),
},
onRowSelectionChange(selectedRowKeys, selectedRows) {
if (multiple) {