Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NumberInput incorrect Parse of large Numbers #6407

Closed
1 of 2 tasks
M4X809 opened this issue Jun 18, 2024 · 2 comments
Closed
1 of 2 tasks

NumberInput incorrect Parse of large Numbers #6407

M4X809 opened this issue Jun 18, 2024 · 2 comments
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@M4X809
Copy link

M4X809 commented Jun 18, 2024

Dependencies check up

  • 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
@rajivchaulagain
Copy link

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

rtivital added a commit that referenced this issue Jun 27, 2024
@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Jun 27, 2024
@rtivital
Copy link
Member

rtivital commented Jul 2, 2024

Fixed in 7.11.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

3 participants