Spinner: decimals are separated by the thousand separator
I'm submitting a ...
[x] bug report
[ ] feature request
[ ] support request
Plunkr Case (Bug Reports) http://plnkr.co/edit/HZxGrxWg7U6Jmq6qKjRc?p=preview
Current behavior Decimals are formatted with thousand separator, if the starting value has 4 or more decimals. Example: 12041.2456 is formatted to 12,041.2,456
Expected behavior No thousand separator on decimals. Example: 12041.2456 -> 12,041.2456
Minimal reproduction of the problem with instructions
Declare a variable with 4 or more decimals and bind that variable with the [(ngModel)] directive. The formatted value shows the thousand separator even in decimals.
Please tell us about your environment: Xubuntu 16.04, Visual Studio Code
-
Angular version: 4.0.0
-
PrimeNG version: 4.0.3
-
Browser: Chrome 58.0.3029.81
-
Language: TypeScript 2.3.0
-
Node (for AoT issues):
node --version= v6.10.2
Are there any plans to fix this issue in the near future? The spinner is not really usable for more than 3 decimals this way.
Related to this bug, it seems that options "thousandSeparator" and "decimalSeparator" are inefficient.
I put together a little change which only formats up to the decimalSeparator.
Actually the spinner can be used only for small integer, too many bugs for other usages. Focus issue when the thousand separator is automatically added + thousand separator for the decimal values + clicking for step increase/decrease discard the decimal value... This component is not mature enough...
PR merged