From d80167d9ecb90815812209dfb6deacba71728c34 Mon Sep 17 00:00:00 2001 From: twwu Date: Fri, 26 Dec 2025 15:09:04 +0800 Subject: [PATCH] refactor: update UserActionItem component props and improve dependency management in useFormContent --- .../workflow/nodes/human-input/components/user-action.tsx | 4 ++-- web/app/components/workflow/nodes/human-input/panel.tsx | 2 +- .../components/workflow/nodes/human-input/use-form-content.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/app/components/workflow/nodes/human-input/components/user-action.tsx b/web/app/components/workflow/nodes/human-input/components/user-action.tsx index 3fe0311f1a..5b5d2304f1 100644 --- a/web/app/components/workflow/nodes/human-input/components/user-action.tsx +++ b/web/app/components/workflow/nodes/human-input/components/user-action.tsx @@ -12,13 +12,13 @@ import ButtonStyleDropdown from './button-style-dropdown' const i18nPrefix = 'workflow.nodes.humanInput' -type Props = { +type UserActionItemProps = { data: UserAction onChange: (state: UserAction) => void onDelete: (id: string) => void } -const UserActionItem: FC = ({ +const UserActionItem: FC = ({ data, onChange, onDelete, diff --git a/web/app/components/workflow/nodes/human-input/panel.tsx b/web/app/components/workflow/nodes/human-input/panel.tsx index 0256e18cb3..fc77ad8ff9 100644 --- a/web/app/components/workflow/nodes/human-input/panel.tsx +++ b/web/app/components/workflow/nodes/human-input/panel.tsx @@ -168,7 +168,7 @@ const Panel: FC> = ({
{inputs.user_actions.map((action, index) => ( handleUserActionChange(index, data)} onDelete={handleUserActionDelete} diff --git a/web/app/components/workflow/nodes/human-input/use-form-content.ts b/web/app/components/workflow/nodes/human-input/use-form-content.ts index be63fc5d43..69326ef40d 100644 --- a/web/app/components/workflow/nodes/human-input/use-form-content.ts +++ b/web/app/components/workflow/nodes/human-input/use-form-content.ts @@ -45,7 +45,7 @@ const useFormContent = (id: string, payload: HumanInputNodeType) => { }) setInputs(newInputs) setEditorKey(editorKey => editorKey + 1) - }, [setInputs, editorKey]) + }, [setInputs]) return { editorKey,