-
Notifications
You must be signed in to change notification settings - Fork 599
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
rfc: use a big-number library for the NumberField component #6881
Comments
Some thoughts:
|
Addressing your points @rajsite:
|
I am researching FluentUI for my Blazor application and I cannot use partial numbers for my number control steps, leading to a poor impression of your product. I use four other control kits that perform this same functionality without issue. Thank you for any effort toward addressing this concern. |
Unfortunately |
💬 RFC
In order to address the multiple issues with how the NumberField component handles things like very large numbers, exponential notation, and localization, I'd like to rewrite it to utilize the MikeMcl/big.js library or something similar.
🔦 Context
There are a bunch of cross-browser problems with how native inputs with
type=number
deal with user input. Some of those issues are conveniently outlined in this Stackoverflow Blog post. Our own number field implementation suffers from most of the bugs addressed in the article, as well as some of its own.The most straightforward way to handle the limitations would be to treat the values of number fields not as a
number
type, but as astring
whenever possible, and as aBig
as provided bybig.js
when dealing with stepping.💻 Examples
The text was updated successfully, but these errors were encountered: