From ac995c4eaf37e1a87bfc24e342c5d85f54e007e0 Mon Sep 17 00:00:00 2001 From: Katherine Date: Tue, 3 Dec 2024 09:45:23 +0800 Subject: [PATCH] fix: record picker not displaying selected items when selecting across pages (#5770) --- .../schema-component/antd/association-field/InternalPicker.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/client/src/schema-component/antd/association-field/InternalPicker.tsx b/packages/core/client/src/schema-component/antd/association-field/InternalPicker.tsx index d7617d3327..81acd1b72b 100644 --- a/packages/core/client/src/schema-component/antd/association-field/InternalPicker.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/InternalPicker.tsx @@ -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) {