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

Leading zero NumberInput behavior less intuitive in v7 compared to v6 #6232

Open
1 of 2 tasks
ibenjelloun opened this issue May 13, 2024 · 0 comments
Open
1 of 2 tasks
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@ibenjelloun
Copy link

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?

7.9.1

What package has an issue?

@mantine/core

What framework do you use?

create-react-app (CRA)

In which browsers you can reproduce the issue?

Chrome

Describe the bug

Summary

The behavior with leading zero while editing changed in v7, the field value changes before blur which is disturbing in some cases.

  • Case 1 : Change 100 to 200 by removing 1 and replacing by 2

v6: can remove only one character and replace it
v6-100-to-200
v7: removing one character removes all leading zeros
v7-100-to-200

  • Case 2 : Change 0.1 to 0.2 by removing 1 and replacing by 2
    v6: can remove only 1 character and replace it with 2
    v6-0 1-to-0 2
    v7: removing the 1 charater removes also the decimal separator
    v7-0 1-to-0 2

  • Case 3 : Typing 0123

v6: can type 0123 the value changes only on blur
v6-0123
v7: can't type 0123 the value changes while typing
v7-0123

All the gifs have been produced using the mantine.dev doc versions :

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
@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label May 24, 2024
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

2 participants