From 2e4354fcf3781353ab421d31e622ebc0d319a061 Mon Sep 17 00:00:00 2001 From: Junyi Date: Mon, 6 Mar 2023 17:45:09 +0800 Subject: [PATCH] fix(plugin-workflow): fix AssociationInput field path (#1542) --- .../workflow/src/client/components/CollectionFieldset.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugins/workflow/src/client/components/CollectionFieldset.tsx b/packages/plugins/workflow/src/client/components/CollectionFieldset.tsx index f7af045f1..385086f5a 100644 --- a/packages/plugins/workflow/src/client/components/CollectionFieldset.tsx +++ b/packages/plugins/workflow/src/client/components/CollectionFieldset.tsx @@ -13,8 +13,8 @@ function AssociationInput(props) { const { getCollectionFields } = useCollectionManager(); const { path } = useField(); const fieldName = path.segments[path.segments.length - 1] as string; - const { values: data } = useForm(); - const fields = getCollectionFields(data?.config?.collection); + const { values: config } = useForm(); + const fields = getCollectionFields(config?.collection); const { type } = fields.find(item => item.name === fieldName); const value = Array.isArray(props.value) ? props.value.join(',') : props.value;