RED-6129, add ids to inputs.
This commit is contained in:
parent
3a5c098128
commit
2cd389c73d
@ -1,5 +1,6 @@
|
||||
<form (submit)="executeAction(null)" [style.max-width]="computedWidth" [style.width]="computedWidth" class="iqser-input-group">
|
||||
<input
|
||||
[id]="inputId"
|
||||
(ngModelChange)="valueChange.emit($event)"
|
||||
[(ngModel)]="value"
|
||||
[autocomplete]="autocomplete"
|
||||
@ -13,9 +14,16 @@
|
||||
|
||||
<mat-icon *ngIf="isSearch && !hasContent" class="icon-right" svgIcon="iqser:search"></mat-icon>
|
||||
|
||||
<iqser-circle-button (action)="reset()" *ngIf="isSearch && hasContent" [size]="25" icon="iqser:close"></iqser-circle-button>
|
||||
<iqser-circle-button
|
||||
[buttonId]="inputId + '-clear'"
|
||||
(action)="reset()"
|
||||
*ngIf="isSearch && hasContent"
|
||||
[size]="25"
|
||||
icon="iqser:close"
|
||||
></iqser-circle-button>
|
||||
|
||||
<iqser-circle-button
|
||||
[buttonId]="actionButtonId"
|
||||
(action)="executeAction($event)"
|
||||
*ngIf="!isSearch"
|
||||
[disabled]="!hasContent"
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { randomString } from '../../utils';
|
||||
|
||||
@Component({
|
||||
selector: 'iqser-input-with-action',
|
||||
@ -7,6 +8,8 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, In
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class InputWithActionComponent {
|
||||
@Input() inputId = `${randomString() + '-search-input'}`;
|
||||
@Input() actionButtonId = `${randomString() + '-action-input'}`;
|
||||
@Input() placeholder = '';
|
||||
@Input() hint?: string;
|
||||
@Input() width: number | 'full' = 250;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<div (click)="toggleEntitySelected($event, entity)" *ngIf="selectionEnabled" class="selection-column">
|
||||
<div [id]="'select-' + entity.id" (click)="toggleEntitySelected($event, entity)" *ngIf="selectionEnabled" class="selection-column">
|
||||
<iqser-round-checkbox [active]="isSelected$ | async"></iqser-round-checkbox>
|
||||
</div>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user