Can you display the fraction digits only when these have been specified by the user?
Otherwise, hide the fraction digits.
For example, in this screenshot, I typed 45 and it displays 45.00.
I set the [minFractionDigits]="2" because I also want to introduce fraction digits.
But I don't want to see the fraction digits all the time: If I type 45, it should display 45. If I type 45.2 it should display 45.2 or 45.20(because I set the minFractionDigits = 2).
Can you fix this or add a new property to control this?
This is the code used for the above result:
<p-inputNumber id="input-{{formIndex}}" class="w-full" formControlName="input" inputId="locale-user" [style]="{width:'100%'}" [minFractionDigits]="2" variant="filled"></p-inputNumber>
Describe the bug
Can you display the fraction digits only when these have been specified by the user? Otherwise, hide the fraction digits.
For example, in this screenshot, I typed 45 and it displays 45.00. I set the [minFractionDigits]="2" because I also want to introduce fraction digits. But I don't want to see the fraction digits all the time: If I type 45, it should display 45. If I type 45.2 it should display 45.2 or 45.20(because I set the minFractionDigits = 2). Can you fix this or add a new property to control this?
This is the code used for the above result:
<p-inputNumber id="input-{{formIndex}}" class="w-full" formControlName="input" inputId="locale-user" [style]="{width:'100%'}" [minFractionDigits]="2" variant="filled"></p-inputNumber>
Environment
Angular 17.3.8. PrimeNG 17.18.7.
Reproducer
No response
Angular version
17.3.8
PrimeNG version
17.18.7
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
20.16.0
Browser(s)
Chrome 127.0
Steps to reproduce the behavior
No response
Expected behavior
No response