-
Notifications
You must be signed in to change notification settings - Fork 419
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
String formatting with decimals <= "0.00000001" are converting wrong #506
Comments
Hey @briancorbin ! Thanks for reporting this issue. We will investigate and pick this up to provide a resolution soon. Keep an eye out for updates! |
Hey @briancorbin, I think the real root cause is that the NumberFormat does not support exponential numbers as value prop. So one solution is to use and pass value, or formattedValue from the values object. The issue was not visible on 4.4.8 as we were converting it to fixed value, so basically it was removing the decimal part of it. We will look into supporting exponential numbers as a separate tasks. But meanwhile don't use the floatValues to pass it back as value prop. |
Describe the issue and the actual behavior
When formatting a string <= "0.0000001", it's converting it into
This is a new issue as of 4.5.0, and the current latest working version without this bug I have found is 4.4.4
Describe the expected behavior
It should be converting this into 1e-7, not 1e7
Provide a CodeSandbox link illustrating the issue
https://codesandbox.io/s/ppo1kvlwpx?file=/index.js
Provide steps to reproduce this issue
type "0.0000001" into the formik field that says "Simple Input Works" and it will turn "0.0000001" into 1e7 and then if you click away it will turn in to 17 in the fields below.
The text was updated successfully, but these errors were encountered: