Skip to content

Conversation

yhnavein
Copy link

@yhnavein yhnavein commented Oct 17, 2020

added unit tests to prove it does the work
chore: added vscode config that won't break anything in this project

The reason I did this change is that before when I was formatting small numbers I was seeing huge numbers instead. Take a look:

<NumberFormat displayType="text" value={0.00000041} thousandSeparator={' '} decimalScale={20} />
or
<NumberFormat displayType="text" value={4.1e-7} thousandSeparator={' '} decimalScale={20} />

would render 5 000 000.000 for some strange reason. Apparently numbers given in a scientific notation are handled very poorly.

I've added a simple support for scientific notation to the NumberFormat component and now it looks much better.

BTW - I've added very simple VSCode config so that it won't prettify whole files on save.

added unit tests to prove it does the work
chore: added vscode config that won't break anything in this project
chore: do not include dev files in npm package
@yhnavein yhnavein force-pushed the fix/scientific-notations branch from 4d612c6 to 77ea545 Compare February 13, 2021 16:38
@yhnavein
Copy link
Author

Bumping topic...

@lorenzoa7
Copy link

Any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants