-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
NumericInput up/down keypress/button click breaks on stepsize smaller than 0.001 #4497
Comments
I'm using the v4.0.0-alpha version and I also encountered the same bug. I think the cause of this bug is num.toLocaleString(locale) in the toLocaleString function of numericInputUtils.ts. So, for example, by using num.toLocaleString(locale, { maximumSignificantDigits: 10 }), I think the number up to the tenth decimal place will work on NumericInput. |
Issue still exists in v5.0.0 |
Opened a pr based on this solution, but I'm not assured why this is happening 🤔 I will do more investigation tomorrow, but, the solution is working and I wrote some tests to cover it |
Does this also resolve?: #4045 |
Environment
Code Sandbox
https://codesandbox.io/s/blueprint-sandbox-forked-98i26
Steps to reproduce
Provide a stepSize and minorStepSize such as 0.0001, and try to modify the input using the up/down button or the keypress. It will lock up and won't fire onValueChange correctly.
Actual behavior
Freezes
Expected behavior
Increments/Decrements value correctly
Possible solution
Tried to investigate a bit but couldn't figure it out. The count decimals util function seems to be working correctly however.
The text was updated successfully, but these errors were encountered: