Hide decimals when decimals are zeros #569
Answered
by
FilipBrannlund
FilipBrannlund
asked this question in
Q&A
-
I have an scenario where I have to support displaying maximum 3 decimals IF the decimals are not zeros. E.g The code below gives
The code below gives
|
Beta Was this translation helpful? Give feedback.
Answered by
FilipBrannlund
Aug 4, 2021
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
FilipBrannlund
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
value={Math.round((11.9991321 + Number.EPSILON) * 1000) / 1000}
formats to11,999
value={Math.round((11 + Number.EPSILON) * 1000) / 1000}
formats to11