Skip to content

Commit

Permalink
fix share link in discover
Browse files Browse the repository at this point in the history
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
  • Loading branch information
abbyhu2000 committed Oct 18, 2023
1 parent 466d298 commit 62d9440
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 62d9440

Please sign in to comment.