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

numberFormatter method returns exponential view of number #750

Closed
KhrystynaPopadyuk opened this Issue Jun 30, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@KhrystynaPopadyuk

KhrystynaPopadyuk commented Jun 30, 2017

Hi,

I have numeric value 2e-7. In order to display it to user I use numberFormatter method (minimumIntegerDigits = 1, minimumFractionDigits = 0, maximumFractionDigits = 10) and as result I expect to get something like "0,0000002" but I get "2e-7".
How can I avoid exponential notation when format such values?

Thanks

@rxaviers rxaviers added the bug label Jun 30, 2017

@rxaviers

This comment has been minimized.

Show comment
Hide comment
@rxaviers

rxaviers Jun 30, 2017

Member

Hi, this is a bug and this code needs fix.

Member

rxaviers commented Jun 30, 2017

Hi, this is a bug and this code needs fix.

@rxaviers

This comment has been minimized.

Show comment
Hide comment
@rxaviers

rxaviers Jun 30, 2017

Member

Instead of using String(number), we needed to use this:

2e-7.toFixed(7)
'0.0000002'
Member

rxaviers commented Jun 30, 2017

Instead of using String(number), we needed to use this:

2e-7.toFixed(7)
'0.0000002'
@rxaviers

This comment has been minimized.

Show comment
Hide comment
@rxaviers

rxaviers Jun 30, 2017

Member

This is fixed! Will be release in 1.3.0.

Member

rxaviers commented Jun 30, 2017

This is fixed! Will be release in 1.3.0.

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