From e240424be58802b91a82b7b4fb5b793252b76999 Mon Sep 17 00:00:00 2001 From: Joel Date: Wed, 4 Dec 2024 10:46:03 +0800 Subject: [PATCH] fix: number variable can not input constant type value in tool config form (#11320) --- .../workflow/nodes/tool/components/input-var-list.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/app/components/workflow/nodes/tool/components/input-var-list.tsx b/web/app/components/workflow/nodes/tool/components/input-var-list.tsx index 10c534509c..5d29b767ad 100644 --- a/web/app/components/workflow/nodes/tool/components/input-var-list.tsx +++ b/web/app/components/workflow/nodes/tool/components/input-var-list.tsx @@ -173,7 +173,8 @@ const InputVarList: FC = ({ value={varInput?.type === VarKindType.constant ? (varInput?.value || '') : (varInput?.value || [])} onChange={handleNotMixedTypeChange(variable)} onOpen={handleOpen(index)} - defaultVarKindType={VarKindType.variable} + defaultVarKindType={isNumber ? VarKindType.constant : VarKindType.variable} + isSupportConstantValue={isSupportConstantValue} filterVar={isNumber ? filterVar : undefined} availableVars={isSelect ? availableVars : undefined} schema={schema}