We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0e48f4f commit bd61fafCopy full SHA for bd61faf
1 file changed
src/components/Search/DropdownList.tsx
@@ -173,11 +173,12 @@ function DropdownList({
173
)}
174
175
{items.map((hit) => {
176
- const currentIndex = hit.document.index || 0;
+ const currentIndex = hit.document.index ?? 0;
177
+ const itemKey = `${sourceName}-${hit.document.id ?? currentIndex}`;
178
179
return (
180
<DropdownListItem
- key={hit.document.id}
181
+ key={itemKey}
182
item={hit.document}
183
selectedIndex={selectedIndex}
184
currentIndex={currentIndex}
0 commit comments