diff --git a/frontend/app/components/Dashboard/components/AddCardSection/AddCardSection.tsx b/frontend/app/components/Dashboard/components/AddCardSection/AddCardSection.tsx
index 42f597511..85bfc451e 100644
--- a/frontend/app/components/Dashboard/components/AddCardSection/AddCardSection.tsx
+++ b/frontend/app/components/Dashboard/components/AddCardSection/AddCardSection.tsx
@@ -213,7 +213,7 @@ function CategoryTab({ tab, inCards }: { tab: string; inCards?: boolean }) {
}
const AddCardSection = observer(
- ({ inCards }: { inCards?: boolean }) => {
+ ({ inCards, handleOpenChange }: { inCards?: boolean, handleOpenChange?: (isOpen: boolean) => void }) => {
const { showModal } = useModal();
const { metricStore, dashboardStore, projectsStore } = useStore();
const [tab, setTab] = React.useState('product_analytics');
@@ -238,6 +238,7 @@ const AddCardSection = observer(
},
}
);
+ handleOpenChange?.(false);
};
return (
{list?.map((item: any, index: any) => (
-
-
- dashboard?.swapWidgetPosition(dragIndex, hoverIndex)
- }
- dashboardId={dashboardId}
- siteId={siteId}
- grid="other"
- showMenu={true}
- isSaved={true}
- />
-
-
} trigger={'click'}>
-
- } shape={'circle'} size={'small'} />
-
-
-
-
+ item={item}
+ index={index}
+ dashboard={dashboard}
+ dashboardId={dashboardId}
+ siteId={siteId}
+ />
))}
)}
@@ -73,4 +52,51 @@ function DashboardWidgetGrid(props: Props) {
);
}
+function GridItem({ item, index, dashboard, dashboardId, siteId }: any) {
+ const [popoverOpen, setPopoverOpen] = React.useState(false);
+ const handleOpenChange = (open: boolean) => {
+ setPopoverOpen(open);
+ };
+
+ return (
+
+
+ dashboard?.swapWidgetPosition(dragIndex, hoverIndex)
+ }
+ dashboardId={dashboardId}
+ siteId={siteId}
+ grid="other"
+ showMenu={true}
+ isSaved={true}
+ />
+
+
}
+ trigger={'click'}
+ >
+
+ } shape={'circle'} size={'small'} />
+
+
+
+
+ )
+}
+
+
export default observer(DashboardWidgetGrid);
diff --git a/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx b/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx
index bdbb72999..d23b96585 100644
--- a/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx
+++ b/frontend/app/components/Dashboard/components/WidgetChart/WidgetChart.tsx
@@ -522,6 +522,7 @@ function WidgetChart(props: Props) {
{renderChart()}
{showTable ? (
void;
defaultOpen?: boolean;
metric: { name: string; viewType: string };
+ inBuilder?: boolean;
}
function WidgetDatatable(props: Props) {
@@ -117,14 +118,20 @@ function WidgetDatatable(props: Props) {
return (
{!isTableOnlyMode && (
-
-
+
+
: }
size={'small'}
type={'default'}
onClick={() => setShowTable(!showTable)}
- className='btn-show-hide-table'
+ className="btn-show-hide-table"
>
{showTable ? 'Hide Table' : 'Show Table'}
@@ -132,7 +139,7 @@ function WidgetDatatable(props: Props) {
)}
- {(showTable || isTableOnlyMode) ? (
+ {showTable || isTableOnlyMode ? (
-
+ {props.inBuilder ? (
+
+ ) : null}
) : null}