fix(explore): Dashboard list is unsorted in save modal (#21317)

Co-authored-by: Herbert Gainor <herbert.gainor@preset.io>
This commit is contained in:
Anthony Gainor 2022-10-03 08:16:35 -06:00 committed by GitHub
parent 31895f412e
commit 3edc656f20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,6 +43,12 @@ export function fetchDashboards(userId) {
value: id, value: id,
label: (json.result[index] || {}).dashboard_title, label: (json.result[index] || {}).dashboard_title,
})); }));
choices.sort((a, b) =>
a.label.localeCompare(b.label, {
sensitivity: 'base',
numeric: true,
}),
);
return dispatch(fetchDashboardsSucceeded(choices)); return dispatch(fetchDashboardsSucceeded(choices));
}) })