Skip to content

Commit

Permalink
[ES|QL] Make the dashboard SO lighter (elastic#172130)
Browse files Browse the repository at this point in the history
## 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.
  • Loading branch information
stratoula committed Nov 29, 2023
1 parent 2ff6a7c commit cb3fd21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Expand Up @@ -401,6 +401,7 @@ describe('Textbased Data Source', () => {
);
expect(suggestions[0].state).toEqual({
...state,
initialContext: undefined,
fieldList: textBasedQueryColumns,
indexPatternRefs: [
{
Expand Down Expand Up @@ -552,6 +553,7 @@ describe('Textbased Data Source', () => {
);
expect(suggestions[0].state).toEqual({
...state,
initialContext: undefined,
fieldList: textBasedQueryColumns,
indexPatternRefs: [
{
Expand Down
Expand Up @@ -145,6 +145,7 @@ export function getTextBasedDatasource({
const query = context.query;
const updatedState = {
...state,
initialContext: undefined,
fieldList: textBasedQueryColumns,
...(context.dataViewSpec.id
? {
Expand Down

0 comments on commit cb3fd21

Please sign in to comment.