Enhancement: quicklaunch fill search suggestion on arrowright (#4256)

This commit is contained in:
shamoon 2024-11-06 10:24:09 -08:00 committed by GitHub
parent 912ae0adfc
commit 794ec127cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -98,6 +98,12 @@ export default function QuickLaunch({ servicesAndBookmarks, searchString, setSea
} else if (event.key === "ArrowUp" && currentItemIndex > 0) { } else if (event.key === "ArrowUp" && currentItemIndex > 0) {
setCurrentItemIndex(currentItemIndex - 1); setCurrentItemIndex(currentItemIndex - 1);
event.preventDefault(); event.preventDefault();
} else if (
event.key === "ArrowRight" &&
results[currentItemIndex] &&
results[currentItemIndex].type === "searchSuggestion"
) {
setSearchString(results[currentItemIndex].name);
} }
} }