mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 06:43:35 +00:00
[PS-1843] Sort organizations in buildOrganizations (#4015)
* Sort organizations in buildOrganizations * Add sort by name to Organization Switcher
This commit is contained in:
@@ -37,8 +37,13 @@ export class VaultFilterService {
|
||||
return new Set(await this.stateService.getCollapsedGroupings());
|
||||
}
|
||||
|
||||
buildOrganizations(): Promise<Organization[]> {
|
||||
return this.organizationService.getAll();
|
||||
async buildOrganizations(): Promise<Organization[]> {
|
||||
let organizations = await this.organizationService.getAll();
|
||||
if (organizations != null) {
|
||||
organizations = organizations.sort((a, b) => a.name.localeCompare(b.name));
|
||||
}
|
||||
|
||||
return organizations;
|
||||
}
|
||||
|
||||
buildNestedFolders(organizationId?: string): Observable<DynamicTreeNode<FolderView>> {
|
||||
|
||||
Reference in New Issue
Block a user