fix(plugin-workflow): fix fields filter in value assignment nodes (#2469)

This commit is contained in:
Junyi 2023-08-16 18:10:34 +07:00 committed by GitHub
parent 39dcb905f4
commit 8528aba694
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,7 @@ const CollectionFieldSet = observer(
const scope = useWorkflowVariableOptions(); const scope = useWorkflowVariableOptions();
const { values: config } = form; const { values: config } = form;
const collectionName = config?.collection; const collectionName = config?.collection;
const collectionFields = getCollectionFields(collectionName); const collectionFields = getCollectionFields(collectionName).filter((field) => field.uiSchema);
const fields = filter ? collectionFields.filter(filter.bind(config)) : collectionFields; const fields = filter ? collectionFields.filter(filter.bind(config)) : collectionFields;
const unassignedFields = useMemo(() => fields.filter((field) => !value || !(field.name in value)), [fields, value]); const unassignedFields = useMemo(() => fields.filter((field) => !value || !(field.name in value)), [fields, value]);