Commit a892ba6ac0fd68c400f341f948095763f960800d

Authored by Sergio Crisostomo
1 parent 7d25930a

prevent firing change when typing numbers < min

Showing 1 changed file with 1 additions and 0 deletions   Show diff stats
src/components/input-number/input-number.vue
... ... @@ -263,6 +263,7 @@
263 263 if (!isNaN(val) && !isEmptyString) {
264 264 this.currentValue = val;
265 265  
  266 + if (event.type == 'input' && val < min) return; // prevent fire early in case user is typing a bigger number. Change will handle this otherwise.
266 267 if (val > max) {
267 268 this.setValue(max);
268 269 } else if (val < min) {
... ...