primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Cannot type value into Spinner. Min/Max validation is run on every key press

Open mdgilene opened this issue 7 years ago • 3 comments

Resubmitting this bug report (old issue #7643) since my last issue was "fixed" and closed without actually changing anything.

I'm submitting a ... (check one with "x")

[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior

Any spinner with a min or max value defined, prevents the user from manually entering a number that starts out outside of the valid range. i.e. min=1000, user starts typing 2000, first character is lower than 1000, so the value value is set to min. Same goes for max just the opposite.

Expected behavior

The check to make sure the value is in the valid range should only happen when the input (change) binding is called. It appears to happen on every (input) binding call.

Minimal reproduction of the problem with instructions

https://stackblitz.com/edit/github-xz1jaz

  • Angular version: 7.X
  • PrimeNG version: 7.1.X
  • Browser: [all]
  • Language: [all]

mdgilene avatar May 30 '19 12:05 mdgilene

Can we get a response on this issue? The spinner component simply does not work if you set min/max values.

mdgilene avatar Jun 15 '19 18:06 mdgilene

I've also experience this bug, it makes the spinner unusable. Seems like the default should be to evaluate onBlur instead of onChange. If the default remains as onChange, the user should not be able to manually type in the input box, otherwise unexpected results will occur.

StephenRansom avatar Sep 03 '19 16:09 StephenRansom

Unable to replicate with PrimeNG 9, if the issue persists please create a new ticket with a test case reproducing the issue e.g. stackblitz or a github repo and it will be reviewed by our team once again.

cagataycivici avatar Mar 25 '20 08:03 cagataycivici