From adb72738f908624d333429cfdcf890f312eebdd0 Mon Sep 17 00:00:00 2001 From: Sheldon Guo Date: Sun, 21 Jul 2024 10:23:04 +0800 Subject: [PATCH] fix: fix custom request linkage rules problem (#4913) --- packages/core/client/src/schema-settings/SchemaSettings.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/core/client/src/schema-settings/SchemaSettings.tsx b/packages/core/client/src/schema-settings/SchemaSettings.tsx index 52cb14e579..915a17fad0 100644 --- a/packages/core/client/src/schema-settings/SchemaSettings.tsx +++ b/packages/core/client/src/schema-settings/SchemaSettings.tsx @@ -987,7 +987,9 @@ export const SchemaSettingsLinkageRules = function LinkageRules(props) { const record = useRecord(); const { type: formBlockType } = useFormBlockType(); const category = props?.category ?? LinkageRuleCategory.default; - const elementType = ['Action', 'Action.Link'].includes(fieldSchema['x-component']) ? 'button' : 'field'; + const elementType = + props?.type || + (fieldSchema?.['x-action'] || ['Action', 'Action.Link'].includes(fieldSchema['x-component']) ? 'button' : 'field'); const gridSchema = findGridSchema(fieldSchema) || fieldSchema; const options = useLinkageCollectionFilterOptions(collectionName);