Skip to content

Commit

Permalink
clear selectedLabel when multiple prop is enabled (#68)
Browse files Browse the repository at this point in the history
* clear selectedLabel when multiple prop is enabled

* set selectedLabel when multiple prop is disabled
  • Loading branch information
tskimmett authored Nov 19, 2021
1 parent 945540e commit c79569e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/select/src/select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -483,8 +483,12 @@
handler(val) {
if (val) {
this.$off('handleOptionClick', this.handleClose);
// selectedLabel is really only a concept for single select mode
this.selectedLabel = '';
} else {
this.$on('handleOptionClick', this.handleClose);
let option = this.getOption(this.value);
this.selectedLabel = option ? option.currentLabel : '';
}
}
}
Expand Down

0 comments on commit c79569e

Please sign in to comment.