mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-28 12:45:45 +01:00
[SM-387] fix org-switcher sorting (#4236)
This commit is contained in:
parent
94b1a7743d
commit
1e53ae4fb2
@ -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$,
|
||||||
|
Loading…
Reference in New Issue
Block a user