Commit 743f6e0639f67f1c5d61234ee76e311a3dd159e9

Authored by Sergio Crisostomo
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 411 clearSingleSelect(){ // PUBLIC API
412 412 this.$emit('on-clear');
413 413 this.hideMenu();
414   - if (this.clearable) this.values = [];
  414 + if (this.clearable) this.reset();
415 415 },
416 416 getOptionData(value){
417 417 const option = this.flatOptions.find(({componentOptions}) => componentOptions.propsData.value === value);
... ... @@ -507,6 +507,8 @@
507 507 }
508 508 },
509 509 reset(){
  510 + this.query = '';
  511 + this.focusIndex = -1;
510 512 this.unchangedQuery = true;
511 513 this.values = [];
512 514 },
... ...