-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[core] fix(NumericInput): increment/decrement with very small step size #6382
Changes from 4 commits
15e2526
96c0f01
f448a57
e4eeb23
e80ba19
9d4d5b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ function getDecimalSeparator(locale: string) { | |
} | ||
|
||
export function toLocaleString(num: number, locale: string = "en-US") { | ||
return sanitizeNumericInput(num.toLocaleString(locale), locale); | ||
return sanitizeNumericInput(num.toLocaleString(locale, { roundingPriority: "morePrecision" } as any), locale); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Rafael-Martins why do you need to cast There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hey, sorry, I forgot to send my commentary about it, but the reason is:
I will add the HACKHACK or even try a better approach! |
||
} | ||
|
||
export function clampValue(value: number, min?: number, max?: number) { | ||
|
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.
I used
as any
here because this property has not included in the type, I was wondering if we have a better way to do it?Reference: microsoft/TypeScript#52072