1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-06 11:43:51 +00:00

fix: [CL-601] Match main for recent signal input changs

Signed-off-by: Ben Brooks <bbrooks@bitwarden.com>
This commit is contained in:
Ben Brooks
2025-07-21 08:21:52 -07:00
parent 702555242d
commit 11bf75f8fd
2 changed files with 8 additions and 8 deletions

View File

@@ -17,15 +17,15 @@
bitInput
[type]="inputType"
[id]="id"
[placeholder]="placeholder ?? ('search' | i18n)"
[placeholder]="placeholder() ?? ('search' | i18n)"
class="tw-ps-9"
name="searchText"
[ngModel]="searchText"
(ngModelChange)="onChange($event)"
(focus)="isInputFocused.set(true)"
(blur)="isInputFocused.set(false); onTouch()"
[disabled]="disabled"
[attr.autocomplete]="autocomplete"
[disabled]="disabled()"
[attr.autocomplete]="autocomplete()"
/>
<button
*ngIf="searchText && showResetButton()"

View File

@@ -1,7 +1,7 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { NgIf, NgClass } from "@angular/common";
import { Component, ElementRef, Input, ViewChild, signal, computed } from "@angular/core";
import { Component, ElementRef, ViewChild, input, model, signal, computed } from "@angular/core";
import {
ControlValueAccessor,
NG_VALUE_ACCESSOR,
@@ -52,9 +52,9 @@ export class SearchComponent implements ControlValueAccessor, FocusableElement {
protected showResetButton = computed(() => this.isInputFocused() || this.isFormHovered());
@Input() disabled: boolean;
@Input() placeholder: string;
@Input() autocomplete: string;
readonly disabled = model<boolean>();
readonly placeholder = input<string>();
readonly autocomplete = input<string>();
getFocusTarget() {
return this.input?.nativeElement;
@@ -94,6 +94,6 @@ export class SearchComponent implements ControlValueAccessor, FocusableElement {
}
setDisabledState(isDisabled: boolean) {
this.disabled = isDisabled;
this.disabled.set(isDisabled);
}
}