From c9e80ee694f32c0280c78d64cc326835b569ae78 Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Fri, 26 Jul 2024 09:52:40 -0400 Subject: [PATCH] help and user menus can be closed by clicking elsewhere or Escape key --- src/app/AppLayout/AppLayout.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/AppLayout/AppLayout.tsx b/src/app/AppLayout/AppLayout.tsx index 07daa0119..e61d3e415 100644 --- a/src/app/AppLayout/AppLayout.tsx +++ b/src/app/AppLayout/AppLayout.tsx @@ -424,6 +424,8 @@ export const AppLayout: React.FC = ({ children }) => { > )} isOpen={showHelpDropdown} + onOpenChange={(v) => setShowHelpDropdown(v)} + onOpenChangeKeys={['Escape']} popperProps={{ position: 'right', }} @@ -437,6 +439,8 @@ export const AppLayout: React.FC = ({ children }) => { onSelect={() => setShowUserInfoDropdown(false)} toggle={UserInfoToggle} isOpen={showUserInfoDropdown} + onOpenChange={(v) => setShowUserInfoDropdown(v)} + onOpenChangeKeys={['Escape']} popperProps={{ position: 'right', }}