Input with action fixes
This commit is contained in:
parent
795a273c9c
commit
ff9dad3ce7
@ -1,4 +1,4 @@
|
||||
<form [style.max-width]="computedWidth" [style.width]="computedWidth" class="iqser-input-group">
|
||||
<form (submit)="executeAction(null)" [style.max-width]="computedWidth" [style.width]="computedWidth" class="iqser-input-group">
|
||||
<input
|
||||
(ngModelChange)="valueChange.emit($event)"
|
||||
[(ngModel)]="value"
|
||||
@ -20,7 +20,6 @@
|
||||
*ngIf="!isSearch"
|
||||
[disabled]="!hasContent"
|
||||
[icon]="icon"
|
||||
[isSubmit]="true"
|
||||
[size]="25"
|
||||
></iqser-circle-button>
|
||||
</form>
|
||||
|
||||
@ -27,7 +27,7 @@ export class InputWithActionComponent {
|
||||
}
|
||||
|
||||
get isSearch(): boolean {
|
||||
return this.action.observers.length === 0;
|
||||
return !this.icon;
|
||||
}
|
||||
|
||||
reset(): void {
|
||||
@ -37,7 +37,7 @@ export class InputWithActionComponent {
|
||||
}
|
||||
|
||||
executeAction($event: MouseEvent): void {
|
||||
$event.stopPropagation();
|
||||
$event?.stopPropagation();
|
||||
|
||||
if (this.hasContent) {
|
||||
this.action.emit(this.value);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user