[Discover] persist columns selection after resetting state, taking into account _source column (#114178) (#114241)

Co-authored-by: Dmitry Tomashevich <39378793+Dmitriynj@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2021-10-07 07:51:52 -04:00 committed by GitHub
parent bbaec75321
commit 779424c3ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -232,7 +232,10 @@ export function getState({
initialAppState = appStateContainer.getState();
},
resetAppState: () => {
const defaultState = getStateDefaults ? getStateDefaults() : {};
const defaultState = handleSourceColumnState(
getStateDefaults ? getStateDefaults() : {},
uiSettings
);
setState(appStateContainerModified, defaultState);
},
getPreviousAppState: () => previousAppState,