Skip to content

Commit

Permalink
[Bug][Discover] Allow saved sort from search embeddable to load in Da…
Browse files Browse the repository at this point in the history
…shboard (#5934) (#5938)

Remove default sort to use saved search sort.

Issue Resolve
#5933

Signed-off-by: Anan Zhuang <ananzh@amazon.com>
(cherry picked from commit 790c076)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Qingyang(Abby) Hu <abigailhu2000@gmail.com>
  • Loading branch information
3 people committed Feb 29, 2024
1 parent 9c15063 commit f808ed3
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/plugins/discover/public/embeddable/search_embeddable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ import {
} from '../../../data/public';
import { Container, Embeddable } from '../../../embeddable/public';
import { ISearchEmbeddable, SearchInput, SearchOutput } from './types';
import { getDefaultSort } from '../application/view_components/utils/get_default_sort';
import { getSortForSearchSource } from '../application/view_components/utils/get_sort_for_search_source';
import {
getRequestInspectorStats,
Expand Down Expand Up @@ -216,12 +215,6 @@ export class SearchEmbeddable
return;
}

const sort = getDefaultSort(
indexPattern,
this.services.uiSettings.get(SORT_DEFAULT_ORDER_SETTING, 'desc')
);
this.savedSearch.sort = sort;

const searchProps: SearchProps = {
columns: this.savedSearch.columns,
sort: [],
Expand Down

0 comments on commit f808ed3

Please sign in to comment.