Commit 743f6e0639f67f1c5d61234ee76e311a3dd159e9
1 parent
cbff5e36
Be more hard on the reset
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
src/components/select/select.vue
@@ -411,7 +411,7 @@ | @@ -411,7 +411,7 @@ | ||
411 | clearSingleSelect(){ // PUBLIC API | 411 | clearSingleSelect(){ // PUBLIC API |
412 | this.$emit('on-clear'); | 412 | this.$emit('on-clear'); |
413 | this.hideMenu(); | 413 | this.hideMenu(); |
414 | - if (this.clearable) this.values = []; | 414 | + if (this.clearable) this.reset(); |
415 | }, | 415 | }, |
416 | getOptionData(value){ | 416 | getOptionData(value){ |
417 | const option = this.flatOptions.find(({componentOptions}) => componentOptions.propsData.value === value); | 417 | const option = this.flatOptions.find(({componentOptions}) => componentOptions.propsData.value === value); |
@@ -507,6 +507,8 @@ | @@ -507,6 +507,8 @@ | ||
507 | } | 507 | } |
508 | }, | 508 | }, |
509 | reset(){ | 509 | reset(){ |
510 | + this.query = ''; | ||
511 | + this.focusIndex = -1; | ||
510 | this.unchangedQuery = true; | 512 | this.unchangedQuery = true; |
511 | this.values = []; | 513 | this.values = []; |
512 | }, | 514 | }, |