diff --git a/reactgrid/lib/cellTemplates/NumberCell.tsx b/reactgrid/lib/cellTemplates/NumberCell.tsx index b50383aa..e406728d 100644 --- a/reactgrid/lib/cellTemplates/NumberCell.tsx +++ b/reactgrid/lib/cellTemplates/NumberCell.tsx @@ -55,8 +55,8 @@ export const NumberCell: FC = ({ onTouchEnd={handleDoubleTouch} onStringValueRequested={() => initialValueStr} onStringValueReceived={(v) => { - const numValue = Number(v); - onValueChanged?.(isNaN(numValue) ? 0 : numValue); + const numValue = v === "" ? NaN : Number(v); + onValueChanged?.(numValue); }} style={style} onDoubleClick={() => {