mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-23 02:27:55 +00:00
refactor: Improve input handling in AddFlowVariableModal
This commit is contained in:
parent
62b051c56c
commit
45dec7a4cc
@ -143,9 +143,16 @@ export const AddFlowVariableModal: React.FC<Props> = ({ flowInfo, setFlowInfo })
|
|||||||
case 'str':
|
case 'str':
|
||||||
return <Input placeholder='Parameter Value' />;
|
return <Input placeholder='Parameter Value' />;
|
||||||
case 'int':
|
case 'int':
|
||||||
return <InputNumber placeholder='Parameter Value' className='w-full' />;
|
return (
|
||||||
|
<InputNumber
|
||||||
|
step={1}
|
||||||
|
placeholder='Parameter Value'
|
||||||
|
parser={value => value?.replace(/[^\-?\d]/g, '') || 0}
|
||||||
|
style={{ width: '100%' }}
|
||||||
|
/>
|
||||||
|
);
|
||||||
case 'float':
|
case 'float':
|
||||||
return <InputNumber placeholder='Parameter Value' className='w-full' />;
|
return <InputNumber placeholder='Parameter Value' style={{ width: '100%' }} />;
|
||||||
case 'bool':
|
case 'bool':
|
||||||
return (
|
return (
|
||||||
<Select placeholder='Select Value'>
|
<Select placeholder='Select Value'>
|
||||||
|
Loading…
Reference in New Issue
Block a user