mantine icon indicating copy to clipboard operation
mantine copied to clipboard

NumberInput incorrect Parse of large Numbers

Open M4X809 opened this issue 1 year ago • 1 comments

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

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 avatar Jun 18 '24 09:06 M4X809

@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)}
        />

rajivchaulagain avatar Jun 26 '24 18:06 rajivchaulagain

Fixed in 7.11.1

rtivital avatar Jul 02 '24 10:07 rtivital