mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-01-18 06:38:34 +01:00
Clear text on command menu close
This commit is contained in:
parent
51d986b86f
commit
cc7f9d94bb
@ -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…
x
Reference in New Issue
Block a user