diff --git a/packages/react/components/Popover.tsx b/packages/react/components/Popover.tsx index 4f2ff0e..de29b7b 100644 --- a/packages/react/components/Popover.tsx +++ b/packages/react/components/Popover.tsx @@ -107,8 +107,11 @@ const PopoverContent = React.forwardRef( const internalRef = useRef(null); useEffect(() => { - function handleOutsideClick(e: any) { - if (internalRef.current && !internalRef.current.contains(e.target)) { + function handleOutsideClick(e: MouseEvent) { + if ( + internalRef.current && + !internalRef.current.contains(e.target as Node | null) + ) { setState((prev) => ({ ...prev, opened: false })); } }