diff --git a/packages/core/client/src/block-provider/hooks/index.ts b/packages/core/client/src/block-provider/hooks/index.ts index d8b0bdbf4..6bceb259d 100644 --- a/packages/core/client/src/block-provider/hooks/index.ts +++ b/packages/core/client/src/block-provider/hooks/index.ts @@ -1176,12 +1176,17 @@ export const useAssociationNames = (collection) => { if (schema) { const associations = getAssociationAppends(schema); const appends = flattenNestedList(associations); - console.log(appends, associations); - return { appends, updateAssociationValues: appends.filter((v) => associationValues.includes(v)) }; + return { + appends, + updateAssociationValues: appends.filter((item) => associationValues.some((suffix) => item.endsWith(suffix))), + }; } if (!schema) { const associations = getAssociationAppends(formSchema); const appends = flattenNestedList(associations); - return { appends, updateAssociationValues: appends.filter((v) => associationValues.includes(v)) }; + return { + appends, + updateAssociationValues: appends.filter((item) => associationValues.some((suffix) => item.endsWith(suffix))), + }; } };