[v9.3.x] Fix/60084/save and test (#62749)
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
e7c8704090
commit
fa1b189beb
@@ -22,6 +22,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) => {
|
||||
@@ -33,7 +34,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