mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-14 21:51:25 +00:00
refactor: Improve input handling in AddFlowVariableModal (#1977)
This commit is contained in:
@@ -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'>
|
||||||
|
Reference in New Issue
Block a user