diff --git a/src/lib/inputs/input-with-action/input-with-action.component.ts b/src/lib/inputs/input-with-action/input-with-action.component.ts index 6f781da..cd58098 100644 --- a/src/lib/inputs/input-with-action/input-with-action.component.ts +++ b/src/lib/inputs/input-with-action/input-with-action.component.ts @@ -4,7 +4,6 @@ import { FormsModule } from '@angular/forms'; import { NgIf } from '@angular/common'; import { CircleButtonComponent } from '../../buttons'; import { MatIconModule } from '@angular/material/icon'; -import { StopPropagationDirective } from '../../directives'; @Component({ selector: 'iqser-input-with-action', @@ -12,7 +11,7 @@ import { StopPropagationDirective } from '../../directives'; styleUrls: ['./input-with-action.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, - imports: [FormsModule, NgIf, MatIconModule, CircleButtonComponent, StopPropagationDirective], + imports: [FormsModule, NgIf, MatIconModule, CircleButtonComponent], }) export class InputWithActionComponent { @Input() inputId = `${randomString() + '-search-input'}`; @@ -26,8 +25,6 @@ export class InputWithActionComponent { @Output() readonly action = new EventEmitter(); @Output() readonly valueChange = new EventEmitter(); - constructor(private readonly _changeDetectorRef: ChangeDetectorRef) {} - get hasContent(): boolean { return !!this.value?.length; } @@ -40,6 +37,8 @@ export class InputWithActionComponent { return !this.icon; } + constructor(private readonly _changeDetectorRef: ChangeDetectorRef) {} + reset(): void { this.value = ''; this.valueChange.emit(this.value);