mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-23 21:33:18 +03:00
fixbug When opening multiple left sidebar "three-dot" menus in doc mode, the menu boxes will block each other. #16
This commit is contained in:
parent
86faaadbe8
commit
d4be73b78b
@ -4,6 +4,7 @@ import {
|
|||||||
Cascader,
|
Cascader,
|
||||||
CascaderItemProps,
|
CascaderItemProps,
|
||||||
MuiDivider as Divider,
|
MuiDivider as Divider,
|
||||||
|
MuiClickAwayListener as ClickAwayListener,
|
||||||
} from '@toeverything/components/ui';
|
} from '@toeverything/components/ui';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { NavLink, useNavigate } from 'react-router-dom';
|
import { NavLink, useNavigate } from 'react-router-dom';
|
||||||
@ -233,29 +234,31 @@ function DndTreeItemMoreActions(props: ActionsProps) {
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<ClickAwayListener onClickAway={() => handleClose()}>
|
||||||
<span
|
<div>
|
||||||
className={styles['TreeItemMoreActions']}
|
<span
|
||||||
onClick={handleClick}
|
className={styles['TreeItemMoreActions']}
|
||||||
>
|
onClick={handleClick}
|
||||||
···
|
>
|
||||||
</span>
|
···
|
||||||
<Cascader
|
</span>
|
||||||
items={menuList}
|
<Cascader
|
||||||
anchorEl={anchorEl}
|
items={menuList}
|
||||||
placement="right-start"
|
anchorEl={anchorEl}
|
||||||
open={open}
|
placement="right-start"
|
||||||
onClose={handleClose}
|
open={open}
|
||||||
></Cascader>
|
onClose={handleClose}
|
||||||
<Snackbar
|
></Cascader>
|
||||||
anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
|
<Snackbar
|
||||||
open={alert_open}
|
anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
|
||||||
message={MESSAGES.COPY_LINK_SUCCESS}
|
open={alert_open}
|
||||||
key={'bottomcenter'}
|
message={MESSAGES.COPY_LINK_SUCCESS}
|
||||||
autoHideDuration={2000}
|
key={'bottomcenter'}
|
||||||
onClose={handle_alert_close}
|
autoHideDuration={2000}
|
||||||
/>
|
onClose={handle_alert_close}
|
||||||
</>
|
/>
|
||||||
|
</div>
|
||||||
|
</ClickAwayListener>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user