mantine
mantine copied to clipboard
NumberInput incorrect Parse of large Numbers
Dependencies check up
- [X] I have verified that I use latest version of all @mantine/* packages
What version of @mantine/* packages do you have in package.json?
"@mantine/core": "7.10.2" , "@mantine/hooks": "7.10.2"
What package has an issue?
@mantine/core
What framework do you use?
Vite
In which browsers you can reproduce the issue?
Other, I will specify in the bug description
Describe the bug
When the value of NumberInput in a Controlled State is bigger then the Save Int Limit, the value changes on Focus Los to the next safe Integer
This Happens since i updated to the Newest Version I have 2 Sandboxes for each version. The issue only occurs in the latest version
- @mantine/core": "7.10.2" Dose not work
- @mantine/core": "7.9.2" Dose Work
Best way to Reproduce is to copy and paste a Discord ID in the Field or Just a bunch of numbers to get over the Int Limit
Browser
Tested In Vivaldi(Chrome) and Codesandbox, but i don't think this is relevant in this case
If possible, include a link to a codesandbox with a minimal reproduction
No response
Possible fix
No response
Self-service
- [ ] I would be willing to implement a fix for this issue
@M4X809 If you expect larger numbers, you can use a TextInput with type="number" as follows:
<TextInput value={val}
type="number"
onChange={(event) => setVal(event.currentTarget.value)}
/>
Fixed in 7.11.1