Skip to content

Commit 4b817b9

Browse files
authored
fix highlighting element
1 parent cc506ee commit 4b817b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/Combobox/ComboboxInput.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ watch(rootContext.modelValue, async () => {
9898
9999
watch(rootContext.filterState, () => {
100100
// we exclude virtualized list as the state would be constantly updated,
101-
// and only change highlight when there is no highlighted item
102-
if (!rootContext.isVirtual.value && !rootContext.highlightedElement.value) {
101+
// and only change highlight when previously there were no items displayed
102+
if (!rootContext.isVirtual.value && (oldValue.count === 0)) {
103103
listboxContext.highlightFirstItem()
104104
}
105105
})

0 commit comments

Comments
 (0)