From 482603c378636c17edd044dcd65c5b2acecdf40b Mon Sep 17 00:00:00 2001 From: p-sw Date: Fri, 14 Jun 2024 23:05:36 +0900 Subject: [PATCH] fix: use MouseEvent instead of any --- packages/react/components/Popover.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 })); } }