1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 13:53:34 +00:00

sort access select items (#4922)

This commit is contained in:
Will Martin
2023-03-03 16:44:57 -05:00
committed by GitHub
parent 7736a981e7
commit ae271b5c16

View File

@@ -1,7 +1,16 @@
import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core"; import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
import { FormControl, FormGroup, Validators } from "@angular/forms"; import { FormControl, FormGroup, Validators } from "@angular/forms";
import { ActivatedRoute } from "@angular/router"; import { ActivatedRoute } from "@angular/router";
import { combineLatest, firstValueFrom, Observable, share, Subject, switchMap, tap } from "rxjs"; import {
combineLatest,
firstValueFrom,
map,
Observable,
share,
Subject,
switchMap,
tap,
} from "rxjs";
import { ValidationService } from "@bitwarden/common/abstractions/validation.service"; import { ValidationService } from "@bitwarden/common/abstractions/validation.service";
import { Utils } from "@bitwarden/common/misc/utils"; import { Utils } from "@bitwarden/common/misc/utils";
@@ -87,6 +96,7 @@ export class AccessSelectorComponent implements OnInit {
}) })
) )
), ),
map((selectItems) => selectItems.sort((a, b) => a.listName.localeCompare(b.listName))),
tap(() => { tap(() => {
this.loading = false; this.loading = false;
this.formGroup.reset(); this.formGroup.reset();