Fixed #429 - InputNumber throws error if emptied

pull/457/head
mertsincan 2020-08-27 12:44:51 +03:00
parent 0cb59a5266
commit f93764fcec
1 changed files with 3 additions and 3 deletions

View File

@ -258,9 +258,9 @@ export default {
this.repeat(event, null, -1); this.repeat(event, null, -1);
} }
}, },
onInput(event) { onInput(val) {
if (this.isSpecialChar) { if (this.isSpecialChar) {
event.target.value = this.lastValue; this.$refs.input.$el.value = this.lastValue;
} }
this.isSpecialChar = false; this.isSpecialChar = false;
}, },
@ -581,7 +581,7 @@ export default {
listeners() { listeners() {
return { return {
...this.$listeners, ...this.$listeners,
input: event => this.onInput(event), input: val => this.onInput(val),
keydown: event => this.onInputKeyDown(event), keydown: event => this.onInputKeyDown(event),
keypress: event => this.onInputKeyPress(event), keypress: event => this.onInputKeyPress(event),
paste: event => this.onPaste(event), paste: event => this.onPaste(event),