Replies: 1 comment
-
I hacked this together - here is the summarized version:
Not the most ideal solution as the library should provide some events, but it works very well. const isOpen = useRef<boolean>(false);
const checkIfStateChanged = useCallback(
(open: boolean) => {
if (open !== isOpen.current) {
isOpen.current = open;
if (onChange) {
nextTick(() => onChange(open));
}
}
},
[onChange]
);
return (
<HeadlessPopover className="slds-is-relative" as="span">
{({ open }) => {
checkIfStateChanged(open);
return ( |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be great to have some way of knowing when a Popover panel is closed. Here's an example use-case:
I would like to apply the filters when the popover is closed by clicking outside. I currently have no way of detecting this.
Beta Was this translation helpful? Give feedback.
All reactions