From 30083b6705a8560f74b78ed511a2a68629dffc9f Mon Sep 17 00:00:00 2001 From: Nguyen Thanh Quang Date: Thu, 26 Aug 2021 09:41:32 +0700 Subject: [PATCH] fixed the menu doesn't close when clicking outside (#87) --- src/components/Layout.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index 1d7457e3b..63a1afaef 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -190,12 +190,12 @@ export default function Layout({ children, user, loading, noPaper }) { id='zipline-user-menu' anchorEl={anchorEl} open={open} - onClose={handleClose} + onClose={handleClose(null)} MenuListProps={{ 'aria-labelledby': 'basic-button', }} > - + {user.username} @@ -299,12 +299,12 @@ export default function Layout({ children, user, loading, noPaper }) { id='zipline-user-menu' anchorEl={anchorEl} open={open} - onClose={handleClose} + onClose={handleClose(null)} MenuListProps={{ 'aria-labelledby': 'basic-button', }} > - + {user.username} @@ -378,4 +378,4 @@ export default function Layout({ children, user, loading, noPaper }) { ); -} \ No newline at end of file +}