-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[Bug]: Input after 17 digit converts to 0
after loosing focus in Currency widget
#20075
Comments
Hi @chandannkumar |
Hello @MuhammadAakash can you please explain how you are thinking about the solution to this problem? |
Hi @dilippitchika |
@dilippitchika |
@MuhammadAakash what do you think should be limit if you now remove the 17 digit limit? |
@dilippitchika |
Then i believe the problem will be in how large numbers are processed in JS. I think the 17 digit limit is already too large. Can you first investigate why there's a 17 digit limit? |
@dilippitchika |
@dilippitchika JavaScript's Number.MAX_SAFE_INTEGER is 9007199254740991 and 123456789123456789123 is much larger than that, so when passing this number to the Intl.NumberFormat will truncate the number and format it accordingly. This means that any digits beyond the 17th digit will be truncated and not considered in the final value |
Thanks for the triaging on this @MuhammadAakash really appreciate it, i don't think we need to fix today this as it's very unlikely to have a currency with 17 digits without decimals. I suggest we park this feature for now. |
@dilippitchika |
Setting to low as people won't be facing this in a real scenario |
Is there an existing issue for this?
Description
The inputs after 17 digits are getting converted to
0
automatically in Currency Input widgetSteps To Reproduce
0
Public Sample App
No response
Issue video log
https://bthrujcsw8.vmaker.com/record/ladRprnBm6LCU28A
Version
Cloud / Production
The text was updated successfully, but these errors were encountered: