From 581edc8af95ba8fff484572837e34df7fbf969ce Mon Sep 17 00:00:00 2001 From: Zoe Steinkamp Date: Mon, 20 Jul 2020 10:08:36 -0600 Subject: [PATCH] fix: No longer query tags on advanced builder (#18989) --- ui/src/timeMachine/actions/index.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/src/timeMachine/actions/index.ts b/ui/src/timeMachine/actions/index.ts index 7419125e24..29bbb64f5b 100644 --- a/ui/src/timeMachine/actions/index.ts +++ b/ui/src/timeMachine/actions/index.ts @@ -141,11 +141,15 @@ export const setName = (name: string): SetNameAction => ({ }) export const setTimeRange = (timeRange: TimeRange) => (dispatch, getState) => { - const contextID = currentContext(getState()) + const state = getState() + const contextID = currentContext(state) + const activeQuery = getActiveQuery(state) dispatch(setDashboardTimeRange(contextID, timeRange)) dispatch(saveAndExecuteQueries()) - dispatch(reloadTagSelectors()) + if (activeQuery.editMode === 'builder') { + dispatch(reloadTagSelectors()) + } } interface SetAutoRefreshAction {