Skip to content

Commit

Permalink
🐛 bugfix: keyboard navigation for cached results. Fixes #28
Browse files Browse the repository at this point in the history
  • Loading branch information
niketpathak committed Sep 5, 2022
1 parent 884973c commit 713675a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/typeahead-standalone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ export default function typeahead<T extends Dictionary>(config: typeaheadConfig<
// update items with available suggestions
items = suggestions;

selected = undefined; // unselect previously calculated/cached suggestion
if (autoSelect && items.length) {
selected = items[0];
}
Expand Down

0 comments on commit 713675a

Please sign in to comment.