fix(plugin-workflow): fix AssociationInput field path (#1542)
This commit is contained in:
parent
a463c3d747
commit
2e4354fcf3
@ -13,8 +13,8 @@ function AssociationInput(props) {
|
|||||||
const { getCollectionFields } = useCollectionManager();
|
const { getCollectionFields } = useCollectionManager();
|
||||||
const { path } = useField();
|
const { path } = useField();
|
||||||
const fieldName = path.segments[path.segments.length - 1] as string;
|
const fieldName = path.segments[path.segments.length - 1] as string;
|
||||||
const { values: data } = useForm();
|
const { values: config } = useForm();
|
||||||
const fields = getCollectionFields(data?.config?.collection);
|
const fields = getCollectionFields(config?.collection);
|
||||||
const { type } = fields.find(item => item.name === fieldName);
|
const { type } = fields.find(item => item.name === fieldName);
|
||||||
|
|
||||||
const value = Array.isArray(props.value) ? props.value.join(',') : props.value;
|
const value = Array.isArray(props.value) ? props.value.join(',') : props.value;
|
||||||
|
Loading…
Reference in New Issue
Block a user