-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Units: Format currency with negative before the symbol #65152
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
Conversation
|
You have successfully added a new CodeQL configuration |
leventebalogh
left a comment
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.
Nice! 👏
baldm0mma
left a comment
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.
Fast and elegant solution! Played around with it, and works great. LGTM!
| const scaler = scaledUnits(1000, units); | ||
| return (size: number, decimals?: DecimalCount, scaledDecimals?: DecimalCount) => { | ||
| if (size === null) { | ||
| return (value: number, decimals?: DecimalCount, scaledDecimals?: DecimalCount) => { |
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.
Good change here, value makes way more sense.
Co-authored-by: Levente Balogh <[email protected]>
What is this feature?
We currently format negative monies as
$-100and it should be-$100Why do we need this feature?
to be more normal
Who is this feature for?
[Add information on what kind of user the feature is for.]
Which issue(s) does this PR fix?:
Fixes #65123
Special notes for your reviewer:
Please check that: