diff --git a/src/components/NumberInput/NumberInput.tsx b/src/components/NumberInput/NumberInput.tsx index 391017fc1..874019162 100644 --- a/src/components/NumberInput/NumberInput.tsx +++ b/src/components/NumberInput/NumberInput.tsx @@ -32,7 +32,7 @@ const NumberInput = forwardRef(({ defaultValue, ...prop const handleIncrease = () => { const { max } = props; - if (max) { + if (typeof max !== 'undefined') { return setValue((prevVal) => prevVal + 1 > max ? max : prevVal + 1 ); @@ -42,7 +42,7 @@ const NumberInput = forwardRef(({ defaultValue, ...prop const handleDecrease = () => { const { min } = props; - if (min) { + if (typeof min !== 'undefined') { return setValue((prevVal) => prevVal - 1 < min ? min : prevVal - 1 ); @@ -55,7 +55,7 @@ const NumberInput = forwardRef(({ defaultValue, ...prop {props.showButtons ? : null}
@@ -72,7 +72,7 @@ const NumberInput = forwardRef(({ defaultValue, ...prop />
{props.showButtons ? : null}