Skip to content

Commit

Permalink
Close study search dropdown on keypress
Browse files Browse the repository at this point in the history
  • Loading branch information
alisman committed Jan 17, 2025
1 parent fa0e322 commit 4ff5bed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/shared/components/query/StudySearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@ export const StudySearch: FunctionComponent<StudySearchProps> = observer(
}, []);

const onKeyDownSearchBox = useCallback(
(e: React.KeyboardEvent<HTMLInputElement>) => {
async (e: React.KeyboardEvent<HTMLInputElement>) => {
if (store.isMenuOpen) {
await sleep(500);
store.setMenuOpen(false);
}
},
[]
);
Expand Down

0 comments on commit 4ff5bed

Please sign in to comment.