From f93764fcecf4c4e6bb2dfecad7240cb2dd3aa960 Mon Sep 17 00:00:00 2001 From: mertsincan Date: Thu, 27 Aug 2020 12:44:51 +0300 Subject: [PATCH] Fixed #429 - InputNumber throws error if emptied --- src/components/inputnumber/InputNumber.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/inputnumber/InputNumber.vue b/src/components/inputnumber/InputNumber.vue index 62916925c..08a1258b7 100755 --- a/src/components/inputnumber/InputNumber.vue +++ b/src/components/inputnumber/InputNumber.vue @@ -258,9 +258,9 @@ export default { this.repeat(event, null, -1); } }, - onInput(event) { + onInput(val) { if (this.isSpecialChar) { - event.target.value = this.lastValue; + this.$refs.input.$el.value = this.lastValue; } this.isSpecialChar = false; }, @@ -581,7 +581,7 @@ export default { listeners() { return { ...this.$listeners, - input: event => this.onInput(event), + input: val => this.onInput(val), keydown: event => this.onInputKeyDown(event), keypress: event => this.onInputKeyPress(event), paste: event => this.onPaste(event),