2727-fix(front): CommandMenu and KeyboardMenu invoke handled (#2783)
* 2727-fix(front): CommandMenu and KeyboardMenu invoke handled * Fix Command Menu and bug on metadata re-render --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import { useRecoilValue } from 'recoil';
|
||||
|
||||
import { useCommandMenu } from '@/command-menu/hooks/useCommandMenu';
|
||||
import { useScopedHotkeys } from '@/ui/utilities/hotkey/hooks/useScopedHotkeys';
|
||||
import { AppHotkeyScope } from '@/ui/utilities/hotkey/types/AppHotkeyScope';
|
||||
|
||||
@ -20,9 +21,11 @@ export const KeyboardShortcutMenu = () => {
|
||||
const isKeyboardShortcutMenuOpened = useRecoilValue(
|
||||
isKeyboardShortcutMenuOpenedState,
|
||||
);
|
||||
const { closeCommandMenu } = useCommandMenu();
|
||||
useScopedHotkeys(
|
||||
'shift+?,meta+?',
|
||||
() => {
|
||||
closeCommandMenu();
|
||||
toggleKeyboardShortcutMenu();
|
||||
},
|
||||
AppHotkeyScope.KeyboardShortcutMenu,
|
||||
@ -30,7 +33,7 @@ export const KeyboardShortcutMenu = () => {
|
||||
);
|
||||
|
||||
useScopedHotkeys(
|
||||
'Esc',
|
||||
'esc',
|
||||
() => {
|
||||
closeKeyboardShortcutMenu();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user