From 9f71eb7730091c069e72ca356963932ac067c1a5 Mon Sep 17 00:00:00 2001 From: Katherine Date: Sat, 12 Oct 2024 17:34:46 +0800 Subject: [PATCH] fix: required association field validate error after select value with variable in data scope (#5399) --- .../antd/association-field/AssociationSelect.tsx | 3 ++- 1 file changed, 2 insertions(+), 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 41e14b6063..4097ce0591 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 @@ -82,7 +82,8 @@ const InternalAssociationSelect = observer( if ( linkageFields.includes(fieldPath?.props?.name) && field.value && - fieldPath?.indexes?.[0] === field?.indexes?.[0] + fieldPath?.indexes?.[0] === field?.indexes?.[0] && + fieldPath?.props?.name !== field.props.name ) { field.setValue(undefined); setInnerValue(undefined);