Fix notifications popover not close-able on iPad

This commit is contained in:
Lim Chee Aun 2024-08-04 13:53:06 +08:00
parent f05e3012e3
commit ad7193d067

View file

@ -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"