mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-08 17:16:25 +01: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();
|
if (state === 'open') loadNotifications();
|
||||||
}, [state]);
|
}, [state]);
|
||||||
|
|
||||||
|
const menuRef = useRef();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ControlledMenu
|
<ControlledMenu
|
||||||
|
ref={menuRef}
|
||||||
menuClassName="notifications-menu"
|
menuClassName="notifications-menu"
|
||||||
state={state}
|
state={state}
|
||||||
anchorRef={anchorRef}
|
anchorRef={anchorRef}
|
||||||
|
@ -161,6 +164,11 @@ function NotificationsMenu({ anchorRef, state, onClose }) {
|
||||||
portal={{
|
portal={{
|
||||||
target: document.body,
|
target: document.body,
|
||||||
}}
|
}}
|
||||||
|
containerProps={{
|
||||||
|
onClick: () => {
|
||||||
|
menuRef.current?.closeMenu?.();
|
||||||
|
},
|
||||||
|
}}
|
||||||
overflow="auto"
|
overflow="auto"
|
||||||
viewScroll="close"
|
viewScroll="close"
|
||||||
position="anchor"
|
position="anchor"
|
||||||
|
|
Loading…
Reference in a new issue