Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InputNumber behaves odd when trying to insert fracitonal digits #1441

Closed
TBruegg opened this issue Aug 11, 2021 · 0 comments
Closed

InputNumber behaves odd when trying to insert fracitonal digits #1441

TBruegg opened this issue Aug 11, 2021 · 0 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@TBruegg
Copy link

TBruegg commented Aug 11, 2021

The InputNumber component does not allow to conveniently insert fractional zeros. Instead, it replaces or discards fraction digits when trying to insert 0 in the fractional part. It also prevents entering trailing zeros.

Example for the "Min-Max Fraction Digits" showcase at https://www.primefaces.org/primevue/showcase/#/inputnumber and an initial value of 2.351,35:

Trying to enter a trailing zero does not modify the value at all, which prevents the user from entering a number like 2.351,3501. Note that any number other than 0 may be entered successfully.
It is also not possible to change the initial value from 2.351,35 to 2.351,305 straightforward since inserting a zero in the second fractional position replaces the current digit in that position rather than inserting a new one. This particularly becomes clear when trying to enter a value like 2.351,30005: One needs to enter 2.351,3XXX5 in the first place (where X is any number other than zero) and replace the X digits with zeros afterwards. Entering the number directly is not possible.

Replacing existing digits at the cursor position may be convenient in some cases. However, it should be possible to turn off this behaviour to allow the user to insert any digit (including zeros) at any position as it would be possible in a traditional text field.

@cagataycivici cagataycivici added the Status: Pending Review Issue or pull request is being reviewed by Core Team label Aug 19, 2021
@cagataycivici cagataycivici added this to the 3.7.0 milestone Aug 19, 2021
@mertsincan mertsincan added Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Aug 25, 2021
mertsincan added a commit that referenced this issue Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

3 participants