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
You can limit the number you increase and decrease with the buttons using [min] and [max], but this limitation does not work when entering a number from the keyboard.
Suggested solution:
Why not, if the user enters a number greater than [max] replace that number with [max] and, if the user enters a number less than [min], replace it with [min]?
The text was updated successfully, but these errors were encountered:
We avoid implementing logic such as the solution you've recommended to keep the component flexible. We don't want developers to wonder what magic is happening under the hood as it can be an unwanted behavior by users which can greatly increases maintenance.
You can still achieve this by listening for the value change and updating your ngModel binded variable accordingly. Should be possible with both template-drive and reactive forms.
You can limit the number you increase and decrease with the buttons using [min] and [max], but this limitation does not work when entering a number from the keyboard.
Suggested solution:
Why not, if the user enters a number greater than [max] replace that number with [max] and, if the user enters a number less than [min], replace it with [min]?
The text was updated successfully, but these errors were encountered: