-
Notifications
You must be signed in to change notification settings - Fork 14k
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
fix(explore comma): make that the comma can be added by removing it from token separators… #18926
fix(explore comma): make that the comma can be added by removing it from token separators… #18926
Conversation
… in select component.
Codecov Report
@@ Coverage Diff @@
## master #18926 +/- ##
==========================================
- Coverage 66.76% 66.73% -0.03%
==========================================
Files 1670 1668 -2
Lines 64398 64278 -120
Branches 6499 6500 +1
==========================================
- Hits 42993 42896 -97
+ Misses 19722 19699 -23
Partials 1683 1683
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @prosdev0107 thanks for the contribution! However, I think we shouldn't take this path as the comma is a very common separator. I think we need to override the separators in those instances where it is required. As @michael-s-molina pointed out also, the decimal places separators also vary by locale. Let me know if you want to tackle this problem!
Hi @geido . Okay, I agree . @geido @michael-s-molina Please leave the comment if you have a free time. |
I think a more clean solution is to expose the
All default separators are valid for this control with the exception of the comma.
|
@michael-s-molina That sounds good. |
If you do enable the AntD prop, it might be good to add a control to the interactive Storybook. |
Resolved the review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to create another property in SelectProps
, you just need to add tokenSeparators
in PickedSelectProps
as you can see in my previous comment. You also misspelled tokenSeparators
(you wrote tokenSepErators
)
Resolved. |
@prosdev0107 You can run |
@prosdev0107 just give this a quick rebase, and we should be good to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! @prosdev0107 you have a conflict to resolve. Thanks!
…rom token separators… (#18926) * make that the comma can be added by removing it from token separators in select component. * fix(explore comma): add the allowTokenSeperators props into Select * fix(explore comma): make to allow to customize the token separators in Select. * fix(explore comma): make to add the unit test and story book. * fix(explore comma): make to fix the lint * fix(explore comma): make to fix the spell & add tokenSeparatprs props to PickedSelectProps * Update Select.tsx * fix(explore comma): make to run lint fix (cherry picked from commit e7355b9)
SUMMARY
Cannot add comma to Number Formatting
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
Comma doesn't show up, and the cursor jumps to the beginning of the line. Typing a period then erases everything.
It is because that the comma is used as the token separator in select component.
After:
I fixed this issue by removing the comma from the token separators.
ADDITIONAL INFORMATION