From 6b0f8ac8be0550f99c38eaeb89b334dfa207333d Mon Sep 17 00:00:00 2001 From: Shekar Siri Date: Wed, 9 Mar 2022 16:01:04 +0100 Subject: [PATCH] change(ui) - widget preview loader --- .../CustomMetricWidgetPreview/CustomMetricWidgetPreview.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/CustomMetricWidgetPreview/CustomMetricWidgetPreview.tsx b/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/CustomMetricWidgetPreview/CustomMetricWidgetPreview.tsx index 109243252..10936f1de 100644 --- a/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/CustomMetricWidgetPreview/CustomMetricWidgetPreview.tsx +++ b/frontend/app/components/Dashboard/Widgets/CustomMetricsWidgets/CustomMetricWidgetPreview/CustomMetricWidgetPreview.tsx @@ -58,6 +58,7 @@ function CustomMetricWidget(props: Props) { return }; prevMetricRef.current = metric; + setLoading(true); // fetch new data for the widget preview new APIClient()['post']('/custom_metrics/try', { ...metricParams, ...metric.toSaveData() })