diff --git a/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/index.tsx b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/index.tsx index 9589baf2a..bd96f7257 100644 --- a/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/index.tsx +++ b/packages/plugins/@nocobase/plugin-workflow/src/client/nodes/index.tsx @@ -274,7 +274,7 @@ export function JobButton() { ); } -function useNodeFormProps() { +function useFormProviderProps() { return { form: useForm() }; } @@ -379,7 +379,7 @@ export function NodeDefaultView(props) { { const api = useAPIClient(); const { workflow, refresh } = useFlowContext(); @@ -169,15 +174,14 @@ export const TriggerConfig = () => { const values = cloneDeep(workflow?.config); return createForm({ initialValues: values, - values, disabled: workflow?.executed, }); }, [workflow]); const resetForm = useCallback( - (changed) => { - setFormValueChanged(changed); - if (!changed) { + (editing) => { + setEditingConfig(editing); + if (!editing) { form.reset(); } }, @@ -241,92 +245,98 @@ export const TriggerConfig = () => { - + + }} + /> + );