From 22ab8f1e784b75417332ef98bfa2f9c46f59c72b Mon Sep 17 00:00:00 2001 From: Zeke Zhang <958414905@qq.com> Date: Sun, 13 Oct 2024 12:31:44 +0800 Subject: [PATCH] fix(subTable): fix 'association filedName in collectionName not found' error (#5402) --- packages/core/client/src/block-provider/hooks/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/client/src/block-provider/hooks/index.ts b/packages/core/client/src/block-provider/hooks/index.ts index ca4e54fc45..cc15e0fe2e 100644 --- a/packages/core/client/src/block-provider/hooks/index.ts +++ b/packages/core/client/src/block-provider/hooks/index.ts @@ -1509,7 +1509,8 @@ export const useAssociationNames = (dataSource?: string) => { ['hasOne', 'hasMany', 'belongsTo', 'belongsToMany', 'belongsToArray'].includes(collectionField.type); // 根据联动规则中条件的字段获取一些 appends - if (s['x-linkage-rules']) { + // 需要排除掉子表格和子表单中的联动规则 + if (s['x-linkage-rules'] && !isSubMode(s)) { const collectAppends = (obj) => { const type = Object.keys(obj)[0] || '$and'; const list = obj[type];