1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-13 23:13:36 +00:00

Merge branch 'main' into ps/extension-refresh

This commit is contained in:
Vicki League
2024-08-02 14:41:37 -04:00
251 changed files with 21318 additions and 2748 deletions

View File

@@ -1,4 +1,4 @@
import { Directive, ElementRef, Input, NgZone, Optional } from "@angular/core";
import { Directive, ElementRef, Input, NgZone, OnInit, Optional } from "@angular/core";
import { take } from "rxjs/operators";
import { Utils } from "@bitwarden/common/platform/misc/utils";
@@ -16,7 +16,7 @@ import { FocusableElement } from "../shared/focusable-element";
@Directive({
selector: "[appAutofocus], [bitAutofocus]",
})
export class AutofocusDirective {
export class AutofocusDirective implements OnInit {
@Input() set appAutofocus(condition: boolean | string) {
this.autofocus = condition === "" || condition === true;
}

View File

@@ -50,6 +50,9 @@ export class SelectComponent<T> implements BitFormFieldControl, ControlValueAcce
@ContentChildren(OptionComponent)
protected set options(value: QueryList<OptionComponent<T>>) {
if (value == null || value.length == 0) {
return;
}
this.items = value.toArray();
this.selectedOption = this.findSelectedOption(this.items, this.selectedValue);
}