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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user