Skip to content

Commit

Permalink
Change from toSpec to toMinimalSpec when creating saved search embedd…
Browse files Browse the repository at this point in the history
…able edit link
  • Loading branch information
davismcphee committed Jul 27, 2023
1 parent 584257a commit 2464c63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('getDiscoverLocatorParams', () => {
const input = {} as SearchInput;
expect(getDiscoverLocatorParams({ input, savedSearch: savedSearchMock })).toEqual({
dataViewId: savedSearchMock.searchSource.getField('index')?.id,
dataViewSpec: savedSearchMock.searchSource.getField('index')?.toSpec(),
dataViewSpec: savedSearchMock.searchSource.getField('index')?.toMinimalSpec(),
timeRange: savedSearchMock.timeRange,
refreshInterval: savedSearchMock.refreshInterval,
filters: savedSearchMock.searchSource.getField('filter'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const getDiscoverLocatorParams = ({
? { savedSearchId: savedObjectId }
: {
dataViewId: dataView?.id,
dataViewSpec: dataView?.toSpec(),
dataViewSpec: dataView?.toMinimalSpec(),
timeRange: savedSearch.timeRange,
refreshInterval: savedSearch.refreshInterval,
filters: savedSearch.searchSource.getField('filter') as Filter[],
Expand Down

0 comments on commit 2464c63

Please sign in to comment.