Skip to content

Commit 36f6593

Browse files
fix(ComboBox): highlight selected item based on item id if present (#8313)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent 9df0dbd commit 36f6593

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/react/src/components/ComboBox/ComboBox.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ const ComboBox = (props) => {
347347
tabIndex="-1"
348348
isHighlighted={
349349
highlightedIndex === index ||
350-
(selectedItem && selectedItem.id === item.id) ||
350+
(selectedItem?.id &&
351+
selectedItem?.id === item.id) ||
351352
false
352353
}
353354
title={

0 commit comments

Comments
 (0)