BrowseDashboards: Fix starred toggle (#90138)

This commit is contained in:
Alex Khomenko 2024-07-05 17:11:03 +03:00 committed by GitHub
parent 680f5ed2cc
commit 22df2d9b06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,9 +1,10 @@
import { css } from '@emotion/css';
import { memo, useEffect, useMemo } from 'react';
import { useLocation } from 'react-router-dom';
import AutoSizer from 'react-virtualized-auto-sizer';
import { GrafanaTheme2 } from '@grafana/data';
import { locationService, reportInteraction } from '@grafana/runtime';
import { reportInteraction } from '@grafana/runtime';
import { FilterInput, useStyles2 } from '@grafana/ui';
import { Page } from 'app/core/components/Page/Page';
import { GrafanaRouteComponentProps } from 'app/core/navigation/types';
@ -39,7 +40,8 @@ const BrowseDashboardsPage = memo(({ match }: Props) => {
const styles = useStyles2(getStyles);
const [searchState, stateManager] = useSearchStateManager();
const isSearching = stateManager.hasSearchFilters();
const search = locationService.getSearch();
const location = useLocation();
const search = useMemo(() => new URLSearchParams(location.search), [location.search]);
useEffect(() => {
stateManager.initStateFromUrl(folderUID);