From 3edc656f20ad794be8b892dad1f14c4f7deeca40 Mon Sep 17 00:00:00 2001 From: Anthony Gainor Date: Mon, 3 Oct 2022 08:16:35 -0600 Subject: [PATCH] fix(explore): Dashboard list is unsorted in save modal (#21317) Co-authored-by: Herbert Gainor --- superset-frontend/src/explore/actions/saveModalActions.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/superset-frontend/src/explore/actions/saveModalActions.js b/superset-frontend/src/explore/actions/saveModalActions.js index b5bb2c6f97..1764a009c3 100644 --- a/superset-frontend/src/explore/actions/saveModalActions.js +++ b/superset-frontend/src/explore/actions/saveModalActions.js @@ -43,6 +43,12 @@ export function fetchDashboards(userId) { value: id, label: (json.result[index] || {}).dashboard_title, })); + choices.sort((a, b) => + a.label.localeCompare(b.label, { + sensitivity: 'base', + numeric: true, + }), + ); return dispatch(fetchDashboardsSucceeded(choices)); })