From 2c466db7bb1c1039edea63652327c61ebb3cd6f2 Mon Sep 17 00:00:00 2001 From: Katherine Date: Sat, 17 Aug 2024 17:29:56 +0800 Subject: [PATCH] fix: the selected data in the sub table is overwritten by default values (#5075) --- .../src/schema-component/antd/association-field/SubTable.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx b/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx index 990723f68a..7648c6da63 100644 --- a/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/SubTable.tsx @@ -154,6 +154,7 @@ export const SubTable: any = observer( onClick() { selectedRows.map((v) => field.value.push(v)); field.onInput(field.value); + field.initialValue = field.value; setSelectedRows([]); setVisible(false); },