Skip to content

Commit

Permalink
Reset selected item index on query update
Browse files Browse the repository at this point in the history
  • Loading branch information
nek023 committed May 6, 2023
1 parent e202d11 commit c35514e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/popup/components/App.tsx
Original file line number Diff line number Diff line change
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 c35514e

Please sign in to comment.