Skip to content

Commit

Permalink
[@mantine/core] NumberInput: Fix min/max value being bypassed if …
Browse files Browse the repository at this point in the history
…`0` has been entered as the first digit (#7021)

* Fix number input NaN issue

* Fix issue with clamping the replaced value
  • Loading branch information
owenmoogk authored Nov 7, 2024
1 parent a58f00b commit a29e146
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ export const NumberInput = factory<NumberInputFactory>((_props, ref) => {
setValue(
Number.isNaN(parsedValue) || parsedValue > Number.MAX_SAFE_INTEGER
? replaced
: parsedValue
: clamp(parsedValue, min, max)
);
}
}}
Expand Down

0 comments on commit a29e146

Please sign in to comment.