Add savedSearchId when we update state with searchSource (#113938)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Uladzislau Lasitsa 2021-10-07 10:30:03 +03:00 committed by GitHub
parent b9f0965381
commit 280d1d84b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -103,7 +103,11 @@ export const useVisualizeAppState = (
instance.vis
.setState({
...visState,
data: { aggs, searchSource: { ...visSearchSource, query, filter } },
data: {
aggs,
searchSource: { ...visSearchSource, query, filter },
savedSearchId: instance.vis.data.savedSearchId,
},
})
.then(() => {
// setting up the stateContainer after setState is successful will prevent loading the editor with failures