diff --git a/packages/analytics/analytics-metric-provider/src/composables/useMetricFetcher.ts b/packages/analytics/analytics-metric-provider/src/composables/useMetricFetcher.ts index fd02c83ea8..4e44c0d5cd 100644 --- a/packages/analytics/analytics-metric-provider/src/composables/useMetricFetcher.ts +++ b/packages/analytics/analytics-metric-provider/src/composables/useMetricFetcher.ts @@ -173,7 +173,7 @@ export default function useMetricFetcher(opts: MetricFetcherOptions): FetcherRes }) return { - isLoading: computed(() => metricRequestState.value === STATE.PENDING || [STATE.PENDING, STATE.VALIDATING, STATE.VALIDATING_HAS_DATA].includes(metricRequestState.value)), + isLoading: computed(() => [STATE.PENDING, STATE.VALIDATING, STATE.VALIDATING_HAS_DATA].includes(metricRequestState.value)), hasError: computed(() => STATE.ERROR === metricRequestState.value), raw, mapped, diff --git a/packages/analytics/dashboard-renderer/src/components/QueryDataProvider.vue b/packages/analytics/dashboard-renderer/src/components/QueryDataProvider.vue index 9728e078ce..faef8b62a0 100644 --- a/packages/analytics/dashboard-renderer/src/components/QueryDataProvider.vue +++ b/packages/analytics/dashboard-renderer/src/components/QueryDataProvider.vue @@ -134,6 +134,6 @@ const { state, swrvState: STATE } = useSwrvState(v4Data, error, isValidating) const errorMessage = ref(null) const hasError = computed(() => state.value === STATE.ERROR || !!errorMessage.value) -const isLoading = computed(() => !props.queryReady || state.value === STATE.PENDING || state.value === STATE.VALIDATING_HAS_DATA || state.value === STATE.VALIDATING) +const isLoading = computed(() => !props.queryReady || [STATE.PENDING, STATE.VALIDATING, STATE.VALIDATING_HAS_DATA].includes(state.value))