primereact
primereact copied to clipboard
InputNumber: Isssue with suffix in decimal type number field
Describe the bug
In a InputNumber field having decimal values and suffix, when user try to enter decimal point(.) then suffix is shown 2 times.
User is not able to add digits after the decimal place as when digits are entered, then all the value get lost.
Reproducer
https://codesandbox.io/s/primereact-test-forked-s6vo96
PrimeReact version
8.0.1
React version
18.x
Language
ES6
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
<InputNumber suffix="Kms" min={0} max={999} onValueChange={onChange} mode="decimal" maxFractionDigits={4} />
Expected behavior
No response
Steps to reproduce
- The
maxFractionDigitsproperty of theInputNumberelement needs to be > 1 - The
minFractionDigitsproperty needs to be either absent from theInputNumberelement or it needs to be set to zero - In the input field, type in any numerical characters followed by a period. The suffix will duplicate.
Updated Codesandbox: https://codesandbox.io/s/primereact-test-forked-s6vo96
Confirmed.
@melloware, when the input number enters a value, this fix breaks the InputNumber with currency format. So, reverted.
PrimeVue: https://github.com/primefaces/primevue/issues/3382
This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you for your understanding!