diff --git a/frontend/app/components/Dashboard/components/WidgetSessions/WidgetSessions.tsx b/frontend/app/components/Dashboard/components/WidgetSessions/WidgetSessions.tsx index 9a514dd07..d82cde20b 100644 --- a/frontend/app/components/Dashboard/components/WidgetSessions/WidgetSessions.tsx +++ b/frontend/app/components/Dashboard/components/WidgetSessions/WidgetSessions.tsx @@ -33,12 +33,12 @@ function WidgetSessions(props: Props) { const filteredSessions = getListSessionsBySeries(data, activeSeries); const { dashboardStore, metricStore } = useStore(); const filter = useObserver(() => dashboardStore.drillDownFilter); - const widget: any = metricStore.instance; + const widget: any = useObserver(() => metricStore.instance); const startTime = DateTime.fromMillis(filter.startTimestamp).toFormat('LLL dd, yyyy HH:mm a'); const endTime = DateTime.fromMillis(filter.endTimestamp).toFormat('LLL dd, yyyy HH:mm a'); useEffect(() => { - widget.fetchSessions({ ...filter, filter: widget.toJsonDrilldown()}).then(res => { + widget.fetchSessions({ ...filter, series: widget.toJsonDrilldown() }).then(res => { setData(res); }); }, [filter.startTimestamp, filter.endTimestamp, filter.filters]); diff --git a/frontend/app/mstore/types/widget.ts b/frontend/app/mstore/types/widget.ts index e67fdf4ed..9a6f90fb7 100644 --- a/frontend/app/mstore/types/widget.ts +++ b/frontend/app/mstore/types/widget.ts @@ -158,9 +158,7 @@ export default class Widget implements IWidget { } toJsonDrilldown() { - return { - series: this.series.map((series: any) => series.toJson()), - } + return this.series.map((series: any) => series.toJson()) } toJson() {