diff --git a/src/InputNumber.tsx b/src/InputNumber.tsx index e2817cb4..3e005e4c 100644 --- a/src/InputNumber.tsx +++ b/src/InputNumber.tsx @@ -78,7 +78,7 @@ export interface InputNumberProps decimalSeparator?: string; onInput?: (text: string) => void; - onChange?: (value: T) => void; + onChange?: (value: T | null) => void; onPressEnter?: React.KeyboardEventHandler; onStep?: (value: T, info: { offset: ValueType; type: 'up' | 'down' }) => void; diff --git a/src/utils/MiniDecimal.ts b/src/utils/MiniDecimal.ts index 37b6452f..de3aa649 100644 --- a/src/utils/MiniDecimal.ts +++ b/src/utils/MiniDecimal.ts @@ -3,7 +3,7 @@ import { getNumberPrecision, isE, num2str, trimNumber, validateNumber } from './numberUtil'; import { supportBigInt } from './supportUtil'; -export type ValueType = string | number | null; +export type ValueType = string | number; export interface DecimalClass { add: (value: ValueType) => DecimalClass;