mirror of
https://github.com/grafana/grafana.git
synced 2024-12-26 08:51:33 -06:00
DashList: Sort starred and searched dashboard alphabetically (#31605)
This commit is contained in:
parent
4ad25fa45c
commit
e21b2748f6
@ -105,9 +105,9 @@ export function DashList(props: PanelProps<DashListOptions>) {
|
||||
const [starredDashboards, recentDashboards, searchedDashboards] = useMemo(() => {
|
||||
const dashboardList = [...dashboards.values()];
|
||||
return [
|
||||
dashboardList.filter((dash) => dash.isStarred),
|
||||
dashboardList.filter((dash) => dash.isStarred).sort((a, b) => a.title.localeCompare(b.title)),
|
||||
dashboardList.filter((dash) => dash.isRecent),
|
||||
dashboardList.filter((dash) => dash.isSearchResult),
|
||||
dashboardList.filter((dash) => dash.isSearchResult).sort((a, b) => a.title.localeCompare(b.title)),
|
||||
];
|
||||
}, [dashboards]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user