Explore: Clear queries when switching between metrics and logs (#17505)
This will clear the existing queries when switching between metrics and logs. Closes #17496
This commit is contained in:
@@ -122,6 +122,7 @@ export function changeDatasource(exploreId: ExploreId, datasource: string): Thun
|
||||
*/
|
||||
export function changeMode(exploreId: ExploreId, mode: ExploreMode): ThunkResult<void> {
|
||||
return dispatch => {
|
||||
dispatch(clearQueries(exploreId));
|
||||
dispatch(changeModeAction({ exploreId, mode }));
|
||||
dispatch(runQueries(exploreId));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user