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
|
<input
|
||||||
(ngModelChange)="valueChange.emit($event)"
|
(ngModelChange)="valueChange.emit($event)"
|
||||||
[(ngModel)]="value"
|
[(ngModel)]="value"
|
||||||
@ -20,7 +20,6 @@
|
|||||||
*ngIf="!isSearch"
|
*ngIf="!isSearch"
|
||||||
[disabled]="!hasContent"
|
[disabled]="!hasContent"
|
||||||
[icon]="icon"
|
[icon]="icon"
|
||||||
[isSubmit]="true"
|
|
||||||
[size]="25"
|
[size]="25"
|
||||||
></iqser-circle-button>
|
></iqser-circle-button>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@ -27,7 +27,7 @@ export class InputWithActionComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get isSearch(): boolean {
|
get isSearch(): boolean {
|
||||||
return this.action.observers.length === 0;
|
return !this.icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
reset(): void {
|
reset(): void {
|
||||||
@ -37,7 +37,7 @@ export class InputWithActionComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
executeAction($event: MouseEvent): void {
|
executeAction($event: MouseEvent): void {
|
||||||
$event.stopPropagation();
|
$event?.stopPropagation();
|
||||||
|
|
||||||
if (this.hasContent) {
|
if (this.hasContent) {
|
||||||
this.action.emit(this.value);
|
this.action.emit(this.value);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user