From 298774e020678802d76ac21995a71c8fe1d70d7a Mon Sep 17 00:00:00 2001 From: Hoang Nguyen Date: Fri, 22 Oct 2021 00:24:23 +0700 Subject: [PATCH] sort list idps by alphabest (#5599) --- ui/src/views/auth/Login.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/src/views/auth/Login.vue b/ui/src/views/auth/Login.vue index 53099644ab1..c43f434bc45 100644 --- a/ui/src/views/auth/Login.vue +++ b/ui/src/views/auth/Login.vue @@ -202,6 +202,11 @@ export default { api('listIdps').then(response => { if (response) { this.idps = response.listidpsresponse.idp || [] + this.idps.sort(function (a, b) { + if (a.orgName < b.orgName) { return -1 } + if (a.orgName > b.orgName) { return 1 } + return 0 + }) this.selectedIdp = this.idps[0].id || '' } })