fix(combobox): Fix a bug when highlighted item would be wrong one

This commit is contained in:
Andrey Okonetchnikov committed 2022-09-29 08:56:39 +02:00
1 parent ea0e2e3c7b
commit e574bcd18c
1 file changed
+1 -1
@@ -228,7 +228,7 @@ export const Combobox = <Item extends BaseItem>({
},
onHighlightedIndexChange({ highlightedIndex }) {
if (highlightedIndex !== undefined) {
onItemHighlight?.(items[highlightedIndex]);
onItemHighlight?.(foundItems[highlightedIndex]);
}
},
});