From 866e103a807361cfad08052534055c55453ffbcc Mon Sep 17 00:00:00 2001 From: Maciej Ziarkowski Date: Fri, 22 Nov 2019 16:03:36 +0000 Subject: [PATCH] Handle nullish, not falsey values in numeric input --- .../building/data-components/numeric-data-entry.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/frontend/building/data-components/numeric-data-entry.tsx b/app/src/frontend/building/data-components/numeric-data-entry.tsx index 3c1a21fe..1e9342da 100644 --- a/app/src/frontend/building/data-components/numeric-data-entry.tsx +++ b/app/src/frontend/building/data-components/numeric-data-entry.tsx @@ -27,10 +27,10 @@ const NumericDataEntry: React.FunctionComponent = (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 =>