From fcd2fb8b04a9baeba7a50e4f5645a00c7865d5d6 Mon Sep 17 00:00:00 2001 From: Marcus Efraimsson Date: Tue, 11 Jun 2019 16:18:33 +0200 Subject: [PATCH] Explore: Clear queries when switching between metrics and logs (#17505) This will clear the existing queries when switching between metrics and logs. Closes #17496 --- public/app/features/explore/state/actions.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/public/app/features/explore/state/actions.ts b/public/app/features/explore/state/actions.ts index 4f95744eb47..604101c6632 100644 --- a/public/app/features/explore/state/actions.ts +++ b/public/app/features/explore/state/actions.ts @@ -122,6 +122,7 @@ export function changeDatasource(exploreId: ExploreId, datasource: string): Thun */ export function changeMode(exploreId: ExploreId, mode: ExploreMode): ThunkResult { return dispatch => { + dispatch(clearQueries(exploreId)); dispatch(changeModeAction({ exploreId, mode })); dispatch(runQueries(exploreId)); };