-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
allow -0 at NumberInput filling #8626
Conversation
I can't reproduce the bug you're describing with the latest version (4.7.4): numberinput.movCan you include a way to reproduce the bug, or even better, a unit test that fails in master and passes with your patch? |
The Posters Galore demo hadn't been updated in a few weeks, and the fix is recent (#8610). That explains why you had the bug there. I've updated the Posters Galore demo, and I don't see the bug anymore. |
💯 👍 Yes this will fix my problem. Hrnks, sorry for bothering you. But also thanks for the kind help. ☝️ Will update before my next PR. ☝️ 😁 |
Problem
If you want to enter a negative number <1 (e.g. -0.14)
<NumberInput/>
-onChange
automagically corrects-0
to0
while typing. You can add the-
after a not-0-number (e.g. 0.14) is filled in .Solution
Adding special
-0
input treatment inconvertStringToNumber
.