You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When there is already a '-' entered into an InputNumber component it correctly does not allow adding another '-'.
However this currently also applies when you want to replace a selected value.
It is rather easy to go around this issue with pressing the 'backspace' key first to clear the value but it adds some inconvenience for the user when replacing negative values.
melloware
added
Type: Bug
Issue contains a defect related to a specific component.
and removed
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
labels
May 1, 2024
ujshaikh
pushed a commit
to ujshaikh/primereact
that referenced
this issue
May 4, 2024
Describe the bug
When there is already a '-' entered into an InputNumber component it correctly does not allow adding another '-'.
However this currently also applies when you want to replace a selected value.
It is rather easy to go around this issue with pressing the 'backspace' key first to clear the value but it adds some inconvenience for the user when replacing negative values.
Reproducer
https://primereact.org/inputnumber/
PrimeReact version
10.6.4
React version
18.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
When selecting the whole value together with the '-' and then pressing the key '-', I would expect everything to be replaced with a single '-'.
The text was updated successfully, but these errors were encountered: