fix: action linkage rule not effect in tree collection (#2713)

This commit is contained in:
katherinehhh 2023-09-26 09:43:09 +08:00 committed by GitHub
parent e90eec7031
commit d7a00d2581
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,14 +59,13 @@ export const Action: ComposedAction = observer(
const { modal } = App.useApp(); const { modal } = App.useApp();
let actionTitle = title || compile(fieldSchema.title); let actionTitle = title || compile(fieldSchema.title);
actionTitle = lodash.isString(actionTitle) ? t(actionTitle) : actionTitle; actionTitle = lodash.isString(actionTitle) ? t(actionTitle) : actionTitle;
useEffect(() => { useEffect(() => {
field.linkageProperty = {}; field.linkageProperty = {};
linkageRules linkageRules
.filter((k) => !k.disabled) .filter((k) => !k.disabled)
.forEach((v) => { .forEach((v) => {
return v.actions?.map((h) => { return v.actions?.map((h) => {
linkageAction(h.operator, field, v.condition, values); linkageAction(h.operator, field, v.condition, form.initialValues);
}); });
}); });
}, [linkageRules, values, designable]); }, [linkageRules, values, designable]);