mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-24 16:58:47 +01:00
Possibly fix menu not close-able
This commit is contained in:
parent
d9b9c04ec0
commit
9d2cc6942c
1 changed files with 5 additions and 0 deletions
|
@ -482,6 +482,7 @@ function RelatedActions({ info, instance, authenticated }) {
|
||||||
}, [info, authenticated]);
|
}, [info, authenticated]);
|
||||||
|
|
||||||
const loading = relationshipUIState === 'loading';
|
const loading = relationshipUIState === 'loading';
|
||||||
|
const menuInstanceRef = useRef(null);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
@ -521,6 +522,7 @@ function RelatedActions({ info, instance, authenticated }) {
|
||||||
)}{' '}
|
)}{' '}
|
||||||
<span class="buttons">
|
<span class="buttons">
|
||||||
<Menu
|
<Menu
|
||||||
|
instanceRef={menuInstanceRef}
|
||||||
portal={{
|
portal={{
|
||||||
target: document.body,
|
target: document.body,
|
||||||
}}
|
}}
|
||||||
|
@ -529,6 +531,9 @@ function RelatedActions({ info, instance, authenticated }) {
|
||||||
// Higher than the backdrop
|
// Higher than the backdrop
|
||||||
zIndex: 1001,
|
zIndex: 1001,
|
||||||
},
|
},
|
||||||
|
onClick: () => {
|
||||||
|
menuInstanceRef.current?.closeMenu?.();
|
||||||
|
},
|
||||||
}}
|
}}
|
||||||
align="center"
|
align="center"
|
||||||
position="anchor"
|
position="anchor"
|
||||||
|
|
Loading…
Reference in a new issue