Skip to content

Commit

Permalink
fix share link in discover (#5324) (#5330)
Browse files Browse the repository at this point in the history
Fixes:
#5323

(cherry picked from commit e1db842)

Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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 Oct 23, 2023
1 parent 48a6c5d commit 3512117
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { DiscoverState, setSavedSearchId } from '../../utils/state_management';
import { DOC_HIDE_TIME_COLUMN_SETTING, SORT_DEFAULT_ORDER_SETTING } from '../../../../common';
import { getSortForSearchSource } from '../../view_components/utils/get_sort_for_search_source';
import { getRootBreadcrumbs } from '../../helpers/breadcrumbs';
import { syncQueryStateWithUrl } from '../../../../../data/public';

export const getTopNavLinks = (
services: DiscoverViewServices,
Expand All @@ -35,6 +36,8 @@ export const getTopNavLinks = (
toastNotifications,
chrome,
store,
data: { query },
osdUrlStateStorage,
} = services;

const newSearch = {
Expand Down Expand Up @@ -108,6 +111,9 @@ export const getTopNavLinks = (
// set App state to clean
store!.dispatch({ type: setSavedSearchId.type, payload: id });

// starts syncing `_g` portion of url with query services
syncQueryStateWithUrl(query, osdUrlStateStorage);

return { id };
}
} catch (error) {
Expand Down

0 comments on commit 3512117

Please sign in to comment.