mirror of https://github.com/ElemeFE/element
AutoComplete: fix key enter (#2672)
parent
abb24bba24
commit
f25b8b1edb
|
@ -113,7 +113,7 @@
|
||||||
}, 100);
|
}, 100);
|
||||||
},
|
},
|
||||||
handleKeyEnter() {
|
handleKeyEnter() {
|
||||||
if (this.suggestionVisible) {
|
if (this.suggestionVisible && this.highlightedIndex >= 0 && this.highlightedIndex < this.suggestions.length) {
|
||||||
this.select(this.suggestions[this.highlightedIndex]);
|
this.select(this.suggestions[this.highlightedIndex]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue