Skip to content

Commit

Permalink
fix(input-number): calibration invalid for value=0 (#3048)
Browse files Browse the repository at this point in the history
  • Loading branch information
imp2002 authored Jul 3, 2023
1 parent 4ffe9ed commit 818b39e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/input-number/useInputNumber.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit 818b39e

Please sign in to comment.