[ES|QL] Make the dashboard SO lighter (#172130)

## Summary

This PR makes the dashboard SO lighter by removing the initialContext
from the state. It is not needed after the navigation from Discover to
Dashboard and can create SO size problems as it contains a lot of
information for the transition.
This commit is contained in:
Stratoula Kalafateli 2023-11-29 12:55:21 +02:00 committed by GitHub
parent 2ff6a7cfd4
commit cb3fd2132f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -401,6 +401,7 @@ describe('Textbased Data Source', () => {
);
expect(suggestions[0].state).toEqual({
...state,
initialContext: undefined,
fieldList: textBasedQueryColumns,
indexPatternRefs: [
{
@ -552,6 +553,7 @@ describe('Textbased Data Source', () => {
);
expect(suggestions[0].state).toEqual({
...state,
initialContext: undefined,
fieldList: textBasedQueryColumns,
indexPatternRefs: [
{

View file

@ -145,6 +145,7 @@ export function getTextBasedDatasource({
const query = context.query;
const updatedState = {
...state,
initialContext: undefined,
fieldList: textBasedQueryColumns,
...(context.dataViewSpec.id
? {