Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
listBoxRef.current &&
!listBoxRef.current.contains((event.relatedTarget ||
document.activeElement) as HTMLElement);
if (shouldCloseMenu) {
closeMenu();
}
},
};
const { reference, popper } = usePopper({
placement: "right",
positionFixed: true,
});
useLogger(popper.styles);
const _controlRef = useForkRef(controlRef, reference as any);
const _listBoxRef = useForkRef(listBoxRef, popper as any);
const context = React.useMemo(
() => ({
props: {
selectOptionOnTab,
},
state: {
...state,
isOpen: _isOpen as boolean,
},
dispatch,
actions: {
closeMenu,