Skip to content
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

feat: adding a useGrouping option for number formatting #86

Merged
merged 1 commit into from
Apr 9, 2021

Conversation

dlockhart
Copy link
Member

Within our number input web component, we've decided that we'd like to suppress showing the thousand separators in the input itself. These can be confusing to see in an input, especially when you're trying to change a value by adding/removing digits -- in these cases you need to fix where the thousand separators are before it'll validate.

This is why it's not common to see thousand separators in number inputs -- <input type="number"> doesn't show them, and tools like Excel/Google Sheets only show them where a number is rendered, not where it's inputted.

This change adds an option to suppress thousand separators from formatNumber() -- it follows the same naming convention as the native Intl NumberFormat does.

@dlockhart dlockhart requested a review from margaree April 9, 2021 17:43
@dlockhart dlockhart merged commit 20b4861 into master Apr 9, 2021
@dlockhart dlockhart deleted the use-grouping-options branch April 9, 2021 18:30
@ghost
Copy link

ghost commented Apr 9, 2021

🎉 This PR is included in version 3.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ghost ghost added the released label Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants