Clear text on command menu close

pull/3776/head
Kamran Ahmed 2 years ago
parent 51d986b86f
commit cc7f9d94bb
  1. 2
      src/components/CommandMenu/CommandMenu.tsx

@ -58,6 +58,7 @@ export function CommandMenu() {
});
useOutsideClick(modalRef, () => {
setSearchedText('');
setIsActive(false);
});
@ -147,6 +148,7 @@ export function CommandMenu() {
} else if (e.key === 'Tab') {
e.preventDefault();
} else if (e.key === 'Escape') {
setSearchedText('');
setIsActive(false);
} else if (e.key === 'Enter') {
const activePage = searchResults[activeCounter];

Loading…
Cancel
Save