mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-24 08:48: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]);
|
||||
|
||||
const loading = relationshipUIState === 'loading';
|
||||
const menuInstanceRef = useRef(null);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -521,6 +522,7 @@ function RelatedActions({ info, instance, authenticated }) {
|
|||
)}{' '}
|
||||
<span class="buttons">
|
||||
<Menu
|
||||
instanceRef={menuInstanceRef}
|
||||
portal={{
|
||||
target: document.body,
|
||||
}}
|
||||
|
@ -529,6 +531,9 @@ function RelatedActions({ info, instance, authenticated }) {
|
|||
// Higher than the backdrop
|
||||
zIndex: 1001,
|
||||
},
|
||||
onClick: () => {
|
||||
menuInstanceRef.current?.closeMenu?.();
|
||||
},
|
||||
}}
|
||||
align="center"
|
||||
position="anchor"
|
||||
|
|
Loading…
Reference in a new issue