From 5dd1256cd320ea6eb5602be58c214f67ebfee315 Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Thu, 20 Feb 2025 17:58:19 +0100 Subject: [PATCH] ui: fix card modal from staying open --- .../components/DashboardHeader/DashboardHeader.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/app/components/Dashboard/components/DashboardHeader/DashboardHeader.tsx b/frontend/app/components/Dashboard/components/DashboardHeader/DashboardHeader.tsx index 66937d564..033fe55da 100644 --- a/frontend/app/components/Dashboard/components/DashboardHeader/DashboardHeader.tsx +++ b/frontend/app/components/Dashboard/components/DashboardHeader/DashboardHeader.tsx @@ -22,6 +22,10 @@ type Props = IProps & RouteComponentProps; function DashboardHeader(props: Props) { const { siteId } = props; + const [popoverOpen, setPopoverOpen] = React.useState(false); + const handleOpenChange = (open: boolean) => { + setPopoverOpen(open); + }; const { dashboardStore } = useStore(); const [focusTitle, setFocusedInput] = React.useState(true); const [showEditModal, setShowEditModal] = React.useState(false); @@ -82,7 +86,9 @@ function DashboardHeader(props: Props) { } + open={popoverOpen} + onOpenChange={handleOpenChange} + content={} overlayInnerStyle={{ padding: 0, borderRadius: '0.75rem' }} >