mirror of
https://github.com/jeffvli/sonixd.git
synced 2026-04-30 03:02:37 -04:00
Close search bar after pressing enter
This commit is contained in:
@@ -157,6 +157,8 @@ const Layout = ({ footer, children, disableSidebar, font }: any) => {
|
||||
if (misc.searchQuery.trim()) {
|
||||
history.push(`/search?query=${misc.searchQuery}`);
|
||||
}
|
||||
dispatch(setSearchQuery(''));
|
||||
setOpenSearch(false);
|
||||
}}
|
||||
onKeyDown={(e: KeyboardEvent) => {
|
||||
if (e.key === 'Escape') {
|
||||
|
||||
Reference in New Issue
Block a user