mantinedev / mantine

A fully featured React components library
https://mantine.dev
MIT License
26.79k stars 1.9k forks source link

NumberInput handles big number in an unexpected way #7033

Open Benjaminsson opened 3 weeks ago

Benjaminsson commented 3 weeks ago

Dependencies check up

What version of @mantine/* packages do you have in package.json?

7.13.4

What package has an issue?

@mantine/core

What framework do you use?

Vite

In which browsers you can reproduce the issue?

Chrome

Describe the bug

Big numbers 10_000_000_000_000 and above gets reset when incrementing it.

https://github.com/user-attachments/assets/762daa0e-96c6-4bdc-afcb-4c822deb370b

I don't know if that is expected behaviour but it gets a little extra weird if you have a max amount. Then maybe it should default to the max amount?

https://github.com/user-attachments/assets/a4d460b3-1497-49ff-bdef-8c75d87b5a92

Not sure if this is related but the number -0 defaults to 0 while just a regular 0 defaults to what you defined in the min prop.

https://github.com/user-attachments/assets/93317567-6685-432f-b442-308d4176371c

If possible, include a link to a codesandbox with a minimal reproduction

https://codesandbox.io/p/sandbox/focused-dawn-zrsz64

Possible fix

No response

Self-service

Kenzo-Wada commented 3 weeks ago

I think this is a issue of react-number-format