1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-22 11:45:59 +01: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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,16 @@
import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
import { FormControl, FormGroup, Validators } from "@angular/forms";
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 { 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(() => {
this.loading = false;
this.formGroup.reset();