diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/CardsLibrary.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/CardsLibrary.tsx index f8da8fa70..5636c867f 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/CardsLibrary.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/CardsLibrary.tsx @@ -40,7 +40,9 @@ function CardsLibrary(props: Props) { metricStore.fetchList(); }, []); - const onItemClick = (metricId: number) => { + const onItemClick = (e: any, metricId: number) => { + e.stopPropagation(); + e.preventDefault(); props.onCard(metricId); } @@ -49,10 +51,10 @@ function CardsLibrary(props: Props) {
{cards.map((metric: any) => ( -
onItemClick(metric.metricId)}> +
+
onItemClick(e, metric.metricId)} /> -