fix: No longer query tags on advanced builder (#18989)

pull/18957/head
Zoe Steinkamp 2020-07-20 10:08:36 -06:00 committed by GitHub
parent 6c714b1111
commit 581edc8af9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -141,11 +141,15 @@ export const setName = (name: string): SetNameAction => ({
}) })
export const setTimeRange = (timeRange: TimeRange) => (dispatch, getState) => { 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(setDashboardTimeRange(contextID, timeRange))
dispatch(saveAndExecuteQueries()) dispatch(saveAndExecuteQueries())
dispatch(reloadTagSelectors()) if (activeQuery.editMode === 'builder') {
dispatch(reloadTagSelectors())
}
} }
interface SetAutoRefreshAction { interface SetAutoRefreshAction {