From 928a90942a408d42d5d1a16cc774bd7a32420a93 Mon Sep 17 00:00:00 2001 From: DiamondThree Date: Wed, 3 Aug 2022 11:04:02 +0800 Subject: [PATCH] fix clickaway error in page --- .../src/menu/command-menu/Menu.tsx | 42 ++++++++++--------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/libs/components/editor-plugins/src/menu/command-menu/Menu.tsx b/libs/components/editor-plugins/src/menu/command-menu/Menu.tsx index 3ab140f3bc..1cd22e48e2 100644 --- a/libs/components/editor-plugins/src/menu/command-menu/Menu.tsx +++ b/libs/components/editor-plugins/src/menu/command-menu/Menu.tsx @@ -237,25 +237,29 @@ export const CommandMenu = ({ editor, hooks, style }: CommandMenuProps) => { onKeyUpCapture={handle_keyup} ref={commandMenuContentRef} > - -
- -
-
+ {show ? ( + +
+ +
+
+ ) : ( + <> + )} ); };