mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-24 11:48:04 +00:00
Bump a lot of packages (#625)
* Bump react, luxon, swagger, uuid * Improved imports * Fixed vulnerabilities * Bump highlight.js and added eslint-plugin-react-hooks with fixes * Bump compare-versions, html-react-parser, react-intersection-observer, react-modern-drawer * Bump @tanstack/react-query, react-select * Added tsc:check script
This commit is contained in:
@@ -29,6 +29,15 @@ function DropDown({ items }: DropDownProps) {
|
||||
|
||||
const modalRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
const handleClickOutside = (event: MouseEvent) => {
|
||||
if (modalRef.current && !modalRef.current.contains(event.target as Node)) {
|
||||
setPopupState((prev) => ({
|
||||
...prev,
|
||||
isOpen: false,
|
||||
}));
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (popupState.isOpen) {
|
||||
document.addEventListener("mousedown", handleClickOutside);
|
||||
@@ -41,15 +50,6 @@ function DropDown({ items }: DropDownProps) {
|
||||
};
|
||||
}, [popupState.isOpen]);
|
||||
|
||||
const handleClickOutside = (event: MouseEvent) => {
|
||||
if (modalRef.current && !modalRef.current.contains(event.target as Node)) {
|
||||
setPopupState((prev) => ({
|
||||
...prev,
|
||||
isOpen: false,
|
||||
}));
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="relative flex flex-col items-center">
|
||||
|
||||
Reference in New Issue
Block a user