From d7a00d25817f4484e12956af1e8b21b5e894b564 Mon Sep 17 00:00:00 2001 From: katherinehhh Date: Tue, 26 Sep 2023 09:43:09 +0800 Subject: [PATCH] fix: action linkage rule not effect in tree collection (#2713) --- .../core/client/src/schema-component/antd/action/Action.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/core/client/src/schema-component/antd/action/Action.tsx b/packages/core/client/src/schema-component/antd/action/Action.tsx index bac2b877c..f5c9e3f9d 100644 --- a/packages/core/client/src/schema-component/antd/action/Action.tsx +++ b/packages/core/client/src/schema-component/antd/action/Action.tsx @@ -59,14 +59,13 @@ export const Action: ComposedAction = observer( const { modal } = App.useApp(); let actionTitle = title || compile(fieldSchema.title); actionTitle = lodash.isString(actionTitle) ? t(actionTitle) : actionTitle; - useEffect(() => { field.linkageProperty = {}; linkageRules .filter((k) => !k.disabled) .forEach((v) => { return v.actions?.map((h) => { - linkageAction(h.operator, field, v.condition, values); + linkageAction(h.operator, field, v.condition, form.initialValues); }); }); }, [linkageRules, values, designable]);