Added new search bar shortcut. Fixed bug with forms still being visible after logout. Fixed bug with config fetching order

This commit is contained in:
Paweł Malak
2021-11-14 23:20:37 +01:00
parent d86ebe3e58
commit 07cd725d4a
6 changed files with 46 additions and 32 deletions

View File

@@ -45,12 +45,17 @@ export const SearchBar = (props: Props): JSX.Element => {
if (key === 'Escape') {
clearSearch();
} else if (document.activeElement !== inputRef.current) {
if (key === '`') {
inputRef.current.focus();
clearSearch();
}
}
};
window.addEventListener('keydown', keyOutsideFocus);
window.addEventListener('keyup', keyOutsideFocus);
return () => window.removeEventListener('keydown', keyOutsideFocus);
return () => window.removeEventListener('keyup', keyOutsideFocus);
}, []);
const clearSearch = () => {