You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/09/27 00:56:13 UTC
[GitHub] [superset] agl-developer commented on a diff in pull request #21317: fix(explore): Dashboard list is unsorted in save modal
agl-developer commented on code in PR #21317:
URL: https://github.com/apache/superset/pull/21317#discussion_r980630892
##########
superset-frontend/src/explore/actions/saveModalActions.js:
##########
@@ -40,6 +40,17 @@ export function fetchDashboards(userId) {
value: id,
label: (json.result[index] || {}).dashboard_title,
}));
+ choices.sort((a, b) => {
+ const labelA = a.label.toUpperCase();
+ const labelB = b.label.toUpperCase();
+ if (labelA < labelB) {
+ return -1;
+ }
+ if (labelA > labelB) {
+ return 1;
+ }
+ return 0;
Review Comment:
@michael-s-molina @geido Made a change so that when a string begins with a number it sorts numerically instead. Does not fix all the cases but addresses several.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org