Преглед изворни кода

fix: number variable can not input constant type value in tool config form (#11320)

Joel пре 4 месеци
родитељ
комит
e240424be5
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      web/app/components/workflow/nodes/tool/components/input-var-list.tsx

+ 2 - 1
web/app/components/workflow/nodes/tool/components/input-var-list.tsx

@@ -173,7 +173,8 @@ const InputVarList: FC<Props> = ({
                   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}