From 8cb2bea2d3cc91b5d6d18deead5f9ca014ea2cc5 Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Mon, 20 Jul 2026 02:05:40 +0100 Subject: [PATCH] Fix InputNumberCal component to handle empty string input correctly and streamline value handling in the InputNumber component for improved data entry experience. --- src/components/Dashboard/common/InputNumberCal.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Dashboard/common/InputNumberCal.jsx b/src/components/Dashboard/common/InputNumberCal.jsx index 2f2523a..e069cb6 100644 --- a/src/components/Dashboard/common/InputNumberCal.jsx +++ b/src/components/Dashboard/common/InputNumberCal.jsx @@ -76,7 +76,7 @@ const InputNumberCal = ({ const next = e.target.value setExprValue(next) const num = parseFloat(next) - if (!next) { + if (next === '') { onChange?.(null) } else if (!next.match(/[+\-*/=]/) && !Number.isNaN(num)) { onChange?.(num) @@ -142,11 +142,11 @@ const InputNumberCal = ({ return ( ) }