From 818b39e8f2104ae74c7fe7edc5068cb7de9e68d0 Mon Sep 17 00:00:00 2001 From: imp2002 Date: Mon, 3 Jul 2023 19:27:53 +0800 Subject: [PATCH] fix(input-number): calibration invalid for value=0 (#3048) --- src/input-number/useInputNumber.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input-number/useInputNumber.tsx b/src/input-number/useInputNumber.tsx index 83a9d24e01..dccd5fd695 100644 --- a/src/input-number/useInputNumber.tsx +++ b/src/input-number/useInputNumber.tsx @@ -175,7 +175,7 @@ export default function useInputNumber(props: TdInputNumberProps) { const handleBlur = (value: string, ctx: { e: FocusEvent }) => { const { largeNumber, max, min, decimalPlaces } = props; - if (!props.allowInputOverLimit && tValue.value) { + if (!props.allowInputOverLimit && tValue.value !== undefined) { const r = getMaxOrMinValidateResult({ value: tValue.value, largeNumber, max, min }); if (r === 'below-minimum') { setTValue(min, { type: 'blur', e: ctx.e });