fix(ui): handle floats in NumberInputFieldComponent

This commit is contained in:
psychedelicious 2023-04-26 21:51:22 +10:00
parent 021c63891d
commit f34f416bf5

View File

@ -31,7 +31,12 @@ const NumberInputFieldComponent = (
};
return (
<NumberInput onChange={handleValueChanged} value={field.value}>
<NumberInput
onChange={handleValueChanged}
value={field.value}
step={props.template.type === 'integer' ? 1 : 0.1}
precision={props.template.type === 'integer' ? 0 : 3}
>
<NumberInputField />
<NumberInputStepper>
<NumberIncrementStepper />