diff --git a/packages/plugins/workflow/src/client/ExecutionCanvas.tsx b/packages/plugins/workflow/src/client/ExecutionCanvas.tsx
index 0fb1a6c54..1c7695cfd 100644
--- a/packages/plugins/workflow/src/client/ExecutionCanvas.tsx
+++ b/packages/plugins/workflow/src/client/ExecutionCanvas.tsx
@@ -96,7 +96,7 @@ export function ExecutionCanvas() {
-
+
diff --git a/packages/plugins/workflow/src/client/WorkflowCanvas.tsx b/packages/plugins/workflow/src/client/WorkflowCanvas.tsx
index f3990d572..5ca2c9c6a 100644
--- a/packages/plugins/workflow/src/client/WorkflowCanvas.tsx
+++ b/packages/plugins/workflow/src/client/WorkflowCanvas.tsx
@@ -144,7 +144,7 @@ export function WorkflowCanvas() {
-
+
diff --git a/packages/plugins/workflow/src/client/triggers/index.tsx b/packages/plugins/workflow/src/client/triggers/index.tsx
index 28985c4e9..b8b3f1572 100644
--- a/packages/plugins/workflow/src/client/triggers/index.tsx
+++ b/packages/plugins/workflow/src/client/triggers/index.tsx
@@ -6,7 +6,7 @@ import React from "react";
import { useTranslation } from "react-i18next";
import { InfoOutlined } from '@ant-design/icons';
-import { SchemaComponent, useActionContext, useAPIClient, useCompile, useResourceActionContext } from '@nocobase/client';
+import { SchemaComponent, useActionContext, useAPIClient, useCompile, useRequest, useResourceActionContext } from '@nocobase/client';
import { nodeCardClass, nodeHeaderClass, nodeMetaClass, nodeTitleClass } from "../style";
import { useFlowContext } from "../FlowContext";
@@ -128,9 +128,10 @@ function TriggerExecution() {
);
}
-export const TriggerConfig = ({ workflow }) => {
+export const TriggerConfig = () => {
const { t } = useTranslation();
const compile = useCompile();
+ const { workflow } = useFlowContext();
if (!workflow || !workflow.type) {
return null;
}
@@ -161,7 +162,11 @@ export const TriggerConfig = ({ workflow }) => {
'x-component': 'Action.Drawer',
'x-decorator': 'Form',
'x-decorator-props': {
- initialValue: { config }
+ useValues(options) {
+ return useRequest(() => Promise.resolve({
+ data: { config },
+ }), options);
+ },
},
properties: {
config: {