1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-07 20:24:01 +00:00

finish migrating search

This commit is contained in:
Vicki League
2025-06-24 14:32:12 -04:00
parent 132bb7e1b5
commit bebfc4a159
2 changed files with 4 additions and 6 deletions

View File

@@ -17,7 +17,7 @@
[ngModel]="searchText"
(ngModelChange)="onChange($event)"
(blur)="onTouch()"
[disabled]="disabled"
[disabled]="disabled()"
[attr.autocomplete]="autocomplete()"
/>
</div>

View File

@@ -1,6 +1,6 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { Component, ElementRef, Input, ViewChild, input } from "@angular/core";
import { Component, ElementRef, ViewChild, input, model } from "@angular/core";
import {
ControlValueAccessor,
NG_VALUE_ACCESSOR,
@@ -43,9 +43,7 @@ export class SearchComponent implements ControlValueAccessor, FocusableElement {
// Use `type="text"` for Safari to improve rendering performance
protected inputType = isBrowserSafariApi() ? ("text" as const) : ("search" as const);
// TODO: Skipped for migration because:
// Your application code writes to the input. This prevents migration.
@Input() disabled: boolean;
disabled = model<boolean>();
readonly placeholder = input<string>(undefined);
readonly autocomplete = input<string>(undefined);
@@ -78,6 +76,6 @@ export class SearchComponent implements ControlValueAccessor, FocusableElement {
}
setDisabledState(isDisabled: boolean) {
this.disabled = isDisabled;
this.disabled.set(isDisabled);
}
}