Skip to content

Commit

Permalink
Merge pull request #72 from questbeat/reset-selected-index
Browse files Browse the repository at this point in the history
Reset selected item index on query update
  • Loading branch information
nek023 committed May 6, 2023
2 parents e202d11 + c35514e commit 8ead3d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/popup/components/App.tsx
Expand Up @@ -67,7 +67,10 @@ export const App: React.FC = () => {
);

const handleValueChange = useCallback(
(query: string) => setQuery(query),
(query: string) => {
setQuery(query);
setSelectedItemIndex(0);
},
[setQuery]
);

Expand Down

0 comments on commit 8ead3d2

Please sign in to comment.