Open ScottEAdams opened 6 years ago
OK, easy fix is to set the default value using toFixed:
0.0000001.toFixed(7)
Nope, I take it back. Still a problem when changing values on the form. Any ideas?
So its possible to add the .toFixed in onChanged or set methods of the field but its a bit slow :/
I'm submitting a ...
What is the current behaviour? If using a decimal number with > 6 decimal places the output is converted to exponential. For example:
With a default value of 0.0000001 is converted to exponential output (1e-7).
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net/0mg1v81e/2909/
What is the expected behavior? Perhaps its not a bug but I would expect that the number is shown without exponent.
What is the motivation / use case for changing the behavior? Average user does not understand exponential values.
Other information Tried using numeraljs to set the default value - same problem. Tried using string to set the value, loads well but then becomes an exponential on change of value.