fix: menu should remain open when showing trash alert

This commit is contained in:
Antonella Sgarlatta
2021-05-07 15:41:00 -03:00
parent 8a9dc14d81
commit 9906cd2a20
4 changed files with 28 additions and 9 deletions

View File

@@ -11,6 +11,7 @@ export function useCloseOnBlur(
setOpen: (open: boolean) => void
): [
(event: { relatedTarget: EventTarget | null }) => void,
boolean,
StateUpdater<boolean>
] {
const [locked, setLocked] = useState(false);
@@ -26,6 +27,7 @@ export function useCloseOnBlur(
},
[container, setOpen, locked]
),
locked,
setLocked,
];
}