Handle nullish, not falsey values in numeric input
This commit is contained in:
parent
2ffa14cdbb
commit
866e103a80
@ -27,10 +27,10 @@ const NumericDataEntry: React.FunctionComponent<NumericDataEntryProps> = (props)
|
||||
type="number"
|
||||
id={props.slug}
|
||||
name={props.slug}
|
||||
value={props.value || ''}
|
||||
step={props.step || 1}
|
||||
value={props.value == undefined ? '' : props.value}
|
||||
step={props.step == undefined ? 1 : props.step}
|
||||
max={props.max}
|
||||
min={props.min || 0}
|
||||
min={props.min}
|
||||
disabled={props.mode === 'view' || props.disabled}
|
||||
placeholder={props.placeholder}
|
||||
onChange={e =>
|
||||
|
Loading…
Reference in New Issue
Block a user