You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and I want to be able to cut trailing zeros in the decimal part such that it always displays at least two zeros in the decimal part (which is something you would see in case you have decimalScale:2 for example), but cuts the rest, bearing in mind that max allowed decimals is 5. How should I go about it ?
so desired output would be:
1 => 1.00
1234 => 1,234.00
123.1234 => 123.1234
12345678.90 => 123,456,78.90
12345678.90000 => 123,456,78.90
12345678.90100 => 123,456,78.901
(and entering more than 5 decimals jsut wouldn't be allowed)
I know for the custom format, but what if I don't want to reinvent the wheel and add thousandSeperator and fixedDecimalScale props' logic by myself (because yeah, I'm losing those two if I go for custom formatting)
how should I go about this ?
maybe adding cutTrailingZeros (and providing the int amount of trailing zeros to be cut , if any found) prop in the future , for something like this, would be a good idea?
The text was updated successfully, but these errors were encountered:
So say that I have NumberFormat element with the following props:
and I want to be able to cut trailing zeros in the decimal part such that it always displays at least two zeros in the decimal part (which is something you would see in case you have decimalScale:2 for example), but cuts the rest, bearing in mind that max allowed decimals is 5. How should I go about it ?
so desired output would be:
1 => 1.00
1234 => 1,234.00
123.1234 => 123.1234
12345678.90 => 123,456,78.90
12345678.90000 => 123,456,78.90
12345678.90100 => 123,456,78.901
(and entering more than 5 decimals jsut wouldn't be allowed)
I know for the custom format, but what if I don't want to reinvent the wheel and add thousandSeperator and fixedDecimalScale props' logic by myself (because yeah, I'm losing those two if I go for custom formatting)
how should I go about this ?
maybe adding cutTrailingZeros (and providing the int amount of trailing zeros to be cut , if any found) prop in the future , for something like this, would be a good idea?
The text was updated successfully, but these errors were encountered: