fixed the menu doesn't close when clicking outside (#87)

This commit is contained in:
Nguyen Thanh Quang 2021-08-26 09:41:32 +07:00 committed by GitHub
parent 47db6cf1bd
commit 30083b6705
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -190,12 +190,12 @@ export default function Layout({ children, user, loading, noPaper }) {
id='zipline-user-menu' id='zipline-user-menu'
anchorEl={anchorEl} anchorEl={anchorEl}
open={open} open={open}
onClose={handleClose} onClose={handleClose(null)}
MenuListProps={{ MenuListProps={{
'aria-labelledby': 'basic-button', 'aria-labelledby': 'basic-button',
}} }}
> >
<MenuItem> <MenuItem disableRipple>
<Typography variant='h5'> <Typography variant='h5'>
<b>{user.username}</b> <b>{user.username}</b>
</Typography> </Typography>
@ -299,12 +299,12 @@ export default function Layout({ children, user, loading, noPaper }) {
id='zipline-user-menu' id='zipline-user-menu'
anchorEl={anchorEl} anchorEl={anchorEl}
open={open} open={open}
onClose={handleClose} onClose={handleClose(null)}
MenuListProps={{ MenuListProps={{
'aria-labelledby': 'basic-button', 'aria-labelledby': 'basic-button',
}} }}
> >
<MenuItem> <MenuItem disableRipple>
<Typography variant='h5'> <Typography variant='h5'>
<b>{user.username}</b> <b>{user.username}</b>
</Typography> </Typography>
@ -378,4 +378,4 @@ export default function Layout({ children, user, loading, noPaper }) {
</Box> </Box>
</Box> </Box>
); );
} }