Alpha sort subscriptions and accounts in dropdown (#663)

This commit is contained in:
Steve Faulkner
2021-04-13 18:53:59 -05:00
committed by GitHub
parent d96cecdfe8
commit e8033f0bbc
2 changed files with 3 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ export async function fetchDatabaseAccounts(subscriptionId: string, accessToken:
nextLink = result.nextLink;
accounts = [...accounts, ...result.value];
}
return accounts;
return accounts.sort((a, b) => a.name.localeCompare(b.name));
}
export function useDatabaseAccounts(subscriptionId: string, armToken: string): DatabaseAccount[] | undefined {