mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-24 02:05:39 +03:00
Fix notifications popover not close-able on iPad
This commit is contained in:
parent
f05e3012e3
commit
ad7193d067
1 changed files with 8 additions and 0 deletions
|
@ -152,8 +152,11 @@ function NotificationsMenu({ anchorRef, state, onClose }) {
|
|||
if (state === 'open') loadNotifications();
|
||||
}, [state]);
|
||||
|
||||
const menuRef = useRef();
|
||||
|
||||
return (
|
||||
<ControlledMenu
|
||||
ref={menuRef}
|
||||
menuClassName="notifications-menu"
|
||||
state={state}
|
||||
anchorRef={anchorRef}
|
||||
|
@ -161,6 +164,11 @@ function NotificationsMenu({ anchorRef, state, onClose }) {
|
|||
portal={{
|
||||
target: document.body,
|
||||
}}
|
||||
containerProps={{
|
||||
onClick: () => {
|
||||
menuRef.current?.closeMenu?.();
|
||||
},
|
||||
}}
|
||||
overflow="auto"
|
||||
viewScroll="close"
|
||||
position="anchor"
|
||||
|
|
Loading…
Reference in a new issue