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

Dynamic options breaks InputNumber #1470

Closed
NathanPB opened this issue Jul 28, 2020 · 0 comments
Closed

Dynamic options breaks InputNumber #1470

NathanPB opened this issue Jul 28, 2020 · 0 comments
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@NathanPB
Copy link
Contributor

I'm submitting a ...

[ x ] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57

Codesandbox Case (Bug Reports)
https://codesandbox.io/s/primereact-test-736ws

Current behavior
When dynamically adding/removing a suffix from an InputNumber field, it won't accept more than two numeric digits if the suffix is present, and will reset its value to null after the first digit.

Expected behavior
It should not cap the input in the first digit

Minimal reproduction of the problem with instructions

  1. Access the codesandbox
  2. Type some numbers in the input
  3. It works well
  4. Click in the button to toggle the suffix
  5. Type a n>9 number
  6. Notice the value going to null after the first digit

Please tell us about your environment:
Manjaro Linux, using Code - OSS

  • React version:
    16.8.0

  • PrimeReact version:
    4.2.2

  • Browser: Firefox 78.0.2-1, Chrome 84.0.4147.89. I did not tested others

  • Language: ES6+, both using React hooks and classes

@mertsincan mertsincan self-assigned this Aug 20, 2020
@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label Aug 20, 2020
@mertsincan mertsincan added this to the 5.0 milestone Aug 20, 2020
@mertsincan mertsincan changed the title Dynamic suffix breaks InputNumber Dynamic options breaks InputNumber Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

2 participants