mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 13:53:34 +00:00
[SM-387] fix org-switcher sorting (#4236)
This commit is contained in:
@@ -10,7 +10,10 @@ import type { Organization } from "@bitwarden/common/models/domain/organization"
|
|||||||
templateUrl: "org-switcher.component.html",
|
templateUrl: "org-switcher.component.html",
|
||||||
})
|
})
|
||||||
export class OrgSwitcherComponent {
|
export class OrgSwitcherComponent {
|
||||||
protected organizations$: Observable<Organization[]> = this.organizationService.organizations$;
|
protected organizations$: Observable<Organization[]> =
|
||||||
|
this.organizationService.organizations$.pipe(
|
||||||
|
map((orgs) => orgs.sort((a, b) => a.name.localeCompare(b.name)))
|
||||||
|
);
|
||||||
protected activeOrganization$: Observable<Organization> = combineLatest([
|
protected activeOrganization$: Observable<Organization> = combineLatest([
|
||||||
this.route.paramMap,
|
this.route.paramMap,
|
||||||
this.organizationService.organizations$,
|
this.organizationService.organizations$,
|
||||||
|
|||||||
Reference in New Issue
Block a user