[v9.4.x] Fix/60084/save and test (#62750)
Fix: Save and test error message does not persist across datasource instance settings anymore
(cherry picked from commit ce50168b70)
Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
This commit is contained in:
co-authored by
Timur Olzhabayev
parent
29cc5f9c62
commit
53a1e5b7e6
@@ -23,6 +23,7 @@ import {
|
||||
} from './actions';
|
||||
import { DataSourcesRoutesContext } from './contexts';
|
||||
import { getDataSourceLoadingNav, buildNavModel, getDataSourceNav } from './navModel';
|
||||
import { initialDataSourceSettingsState } from './reducers';
|
||||
import { getDataSource, getDataSourceMeta } from './selectors';
|
||||
|
||||
export const useInitDataSourceSettings = (uid: string) => {
|
||||
@@ -34,7 +35,7 @@ export const useInitDataSourceSettings = (uid: string) => {
|
||||
return function cleanUp() {
|
||||
dispatch(
|
||||
cleanUpAction({
|
||||
cleanupAction: (state) => state.dataSourceSettings,
|
||||
cleanupAction: (state) => (state.dataSourceSettings = initialDataSourceSettingsState),
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user