diff --git a/public/app/features/explore/state/actions.ts b/public/app/features/explore/state/actions.ts index f9092fb4206..3d2896f38d3 100644 --- a/public/app/features/explore/state/actions.ts +++ b/public/app/features/explore/state/actions.ts @@ -75,7 +75,8 @@ export function changeDatasource(exploreId: ExploreId, datasource: string): Thun const currentDataSourceInstance = getState().explore[exploreId].datasourceInstance; const modifiedQueries = getState().explore[exploreId].modifiedQueries; - dispatch(importQueries(exploreId, modifiedQueries, currentDataSourceInstance, newDataSourceInstance)); + await dispatch(importQueries(exploreId, modifiedQueries, currentDataSourceInstance, newDataSourceInstance)); + dispatch(updateDatasourceInstance(exploreId, newDataSourceInstance)); dispatch(loadDatasource(exploreId, newDataSourceInstance)); };