From e883985c4de5897e264e56d0d08aed020adc5c32 Mon Sep 17 00:00:00 2001 From: Katherine Date: Wed, 28 Aug 2024 16:36:43 +0800 Subject: [PATCH] fix: association select data scope linkage should be supported in sub-form (#5146) * fix: association select data scope linkage support sub-form * fix: bug --- .../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 dee73be25d..ee3f7c5baf 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 @@ -41,7 +41,7 @@ export const filterAnalyses = (filters): any[] => { if (!operator) { return true; } - const regex = /\{\{\$(?:[a-zA-Z_]\w*)\.([a-zA-Z_]\w*)(?:\.id)?\}\}/; + const regex = /\{\{\$[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\.(\w+)\.id\}\}/; const fieldName = jsonlogic?.value?.match?.(regex)?.[1]; if (fieldName) { results.push(fieldName);