From e7187e536d636d95ac41dbf1d187b4ef9d1baefc Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Thu, 4 Apr 2024 22:42:05 +0800 Subject: [PATCH] fix: edit form unchanged should not appear unSaveed warning when cloas modal (#3920) --- .../antd/association-field/AssociationSelect.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/client/src/schema-component/antd/association-field/AssociationSelect.tsx b/packages/core/client/src/schema-component/antd/association-field/AssociationSelect.tsx index d9c1a8ea77..62af07e9f9 100644 --- a/packages/core/client/src/schema-component/antd/association-field/AssociationSelect.tsx +++ b/packages/core/client/src/schema-component/antd/association-field/AssociationSelect.tsx @@ -71,7 +71,7 @@ const InternalAssociationSelect = observer( onFieldChange('*', (fieldPath: any) => { const linkageFields = filterAnalyses(field.componentProps?.service?.params?.filter) || []; if (linkageFields.includes(fieldPath?.props?.name) && field.value) { - props.onChange(field.initialValue); + field.setValue(field.initialValue); setInnerValue(field.initialValue); } });