Fix menu not appearing due to portal-ing to different container

This commit is contained in:
Lim Chee Aun 2023-03-01 15:44:58 +08:00
parent 3c7fc30444
commit 6342268945

View file

@ -562,10 +562,13 @@ function Status({
<Menu <Menu
instanceRef={menuInstanceRef} instanceRef={menuInstanceRef}
portal={{ portal={{
target: target: document.body,
document.querySelector('.status-deck') || document.body,
}} }}
containerProps={{ containerProps={{
style: {
// Higher than the backdrop
zIndex: 1001,
},
onClick: () => { onClick: () => {
menuInstanceRef.current?.closeMenu?.(); menuInstanceRef.current?.closeMenu?.();
}, },