diff --git a/web/src/views/Workflow/components/Properties/CycleVarsList/index.tsx b/web/src/views/Workflow/components/Properties/CycleVarsList/index.tsx index 13e00ea2..9e28c958 100644 --- a/web/src/views/Workflow/components/Properties/CycleVarsList/index.tsx +++ b/web/src/views/Workflow/components/Properties/CycleVarsList/index.tsx @@ -1,6 +1,6 @@ import { type FC } from 'react' import { useTranslation } from 'react-i18next'; -import { Form, Select, Input, Button } from 'antd' +import { Form, Select, Input, Button, InputNumber } from 'antd' import VariableSelect from '../VariableSelect' import type { Suggestion } from '../../Editor/plugin/AutocompletePlugin' @@ -93,6 +93,7 @@ const CycleVarsList: FC = ({ {fields.map(({ key, name }, index) => { + const currentType = value?.[index]?.type; const currentInputType = value?.[index]?.input_type; return ( @@ -131,7 +132,8 @@ const CycleVarsList: FC = ({ - {currentInputType === 'variable' ? ( + {currentInputType === 'variable' + ? ( { @@ -143,7 +145,15 @@ const CycleVarsList: FC = ({ variant="borderless" size="small" /> - ) : ( + ) + : currentType === 'number' + ? form.setFieldValue([name, 'value'], value)} + /> + : (