primeng
primeng copied to clipboard
InputNumber suffix block entering fraction digits in field
Describe the bug
When I provide suffix for input number with mode=decimal then I cannot provide fraction digits. After enter dot and provide fraction digit the field will cleared.
<p-inputNumber suffix="Mg" mode="decimal" [maxFractionDigits]="5">
But when I set minFractionDigits more than 0 then problem is gone.
<p-inputNumber suffix="Mg" mode="decimal" [minFractionDigits]="2" [maxFractionDigits]="5">
Environment
Error repeated regardless of environment settings. Also repeats on sample code in documentation
Reproducer
https://stackblitz.com/edit/gv83do?file=src%2Fapp%2Fdemo%2Finput-number-numerals-demo.html
Angular version
17.0.9
PrimeNG version
17.6.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
20.10.0
Browser(s)
Chrome 121
Steps to reproduce the behavior
- Try enter value with fraction digits eg. 1.234 in field is
- After enter dot and number will clear form value.
The sample video describing steps: https://github.com/primefaces/primeng/assets/1591522/8fa99b46-ca8d-4a09-af2d-14550c9b1737
Expected behavior
Values after the decimal point should be able to be entered.
Hi, I can confirm I have the same issue. There is an issue when mode="currency" also as the currency mode uses prefixes/suffixes https://github.com/primefaces/primeng/issues/14227
This seems to be a recurrent breakage:
- same issue existed and was fixed in v12: https://github.com/primefaces/primeng/issues/9275
- and again in v14: https://github.com/primefaces/primeng/issues/11630 And I confirm having the same issue in v17 too.
Same issue in 17.18.2