From 5196b47b2993f321f076622ed3354981bfadba93 Mon Sep 17 00:00:00 2001 From: Katherine Date: Fri, 30 Aug 2024 17:57:50 +0800 Subject: [PATCH] fix: issue with association select data scope linkage in sub-table (#5160) * fix: association select data scope linkage in sub-table * fix: association select data scope linkage in sub-table --- .../antd/association-field/AssociationSelect.tsx | 6 +++++- 1 file changed, 5 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 89bb046ad8..41e14b6063 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 @@ -79,7 +79,11 @@ const InternalAssociationSelect = observer( //支持深层次子表单 onFieldInputValueChange('*', (fieldPath: any) => { const linkageFields = filterAnalyses(field.componentProps?.service?.params?.filter) || []; - if (linkageFields.includes(fieldPath?.props?.name) && field.value) { + if ( + linkageFields.includes(fieldPath?.props?.name) && + field.value && + fieldPath?.indexes?.[0] === field?.indexes?.[0] + ) { field.setValue(undefined); setInnerValue(undefined); }