From e21b2748f6d1c2310a67e222c08b66a53d72b98b Mon Sep 17 00:00:00 2001 From: Alex Khomenko Date: Wed, 3 Mar 2021 08:59:01 +0200 Subject: [PATCH] DashList: Sort starred and searched dashboard alphabetically (#31605) --- public/app/plugins/panel/dashlist/DashList.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/plugins/panel/dashlist/DashList.tsx b/public/app/plugins/panel/dashlist/DashList.tsx index 682557f91ff..664e4d017d9 100644 --- a/public/app/plugins/panel/dashlist/DashList.tsx +++ b/public/app/plugins/panel/dashlist/DashList.tsx @@ -105,9 +105,9 @@ export function DashList(props: PanelProps) { 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]);