Fixed #1720 - BUG: Autocomplete #header slot with autoHighlight option

pull/1751/head
Tuğçe Küçükoğlu 2021-11-09 14:12:37 +03:00
parent 34a40aec1c
commit 1897f7ee43
1 changed files with 2 additions and 1 deletions

View File

@ -191,7 +191,8 @@ export default {
this.bindResizeListener();
if (this.autoHighlight && this.suggestions && this.suggestions.length) {
DomHandler.addClass(this.overlay.firstElementChild.firstElementChild, 'p-highlight')
let itemList = DomHandler.findSingle(this.overlay, '.p-autocomplete-items');
DomHandler.addClass(itemList.firstElementChild, 'p-highlight');
}
},
onOverlayLeave() {