Skip to content

Commit

Permalink
Select: fix keydown/up hoverIndex be incorrect.
Browse files Browse the repository at this point in the history
  • Loading branch information
tianchao1995 committed Jul 12, 2022
1 parent 7e5b099 commit f0fd684
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/select/src/select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,10 @@
this.previousQuery = val;
this.$nextTick(() => {
if (this.visible) this.broadcast('ElSelectDropdown', 'updatePopper');
if (this.hoverIndex > -1 && !this.options[this.hoverIndex].visible) {
this.hoverIndex = -1;
}
});
this.hoverIndex = -1;
if (this.multiple && this.filterable) {
this.$nextTick(() => {
const length = this.$refs.input.value.length * 15 + 20;
Expand Down

0 comments on commit f0fd684

Please sign in to comment.