24 lines
805 B
HTML
24 lines
805 B
HTML
<mat-form-field>
|
|
<mat-label>Redeemable Action</mat-label>
|
|
<input
|
|
matInput
|
|
type="text"
|
|
placeholder="Pick a Redeemable Action"
|
|
aria-label="redeemable action"
|
|
[formControl]="formControl"
|
|
[matAutocomplete]="auto"
|
|
(blur)="blur()"
|
|
(input)="input()">
|
|
<mat-autocomplete #auto="matAutocomplete" [displayWith]="displayFn" (optionSelected)="select($event.option.value)">
|
|
@for (action of filteredActions; track action.name) {
|
|
<mat-option [value]="action">{{action.name}}</mat-option>
|
|
}
|
|
</mat-autocomplete>
|
|
@if (!search && formControl.invalid && (formControl.dirty || formControl.touched)) {
|
|
@for (error of errorMessageKeys; track $index) {
|
|
@if (formControl.hasError(error)) {
|
|
<small class="error">{{errorMessages[error]}}</small>
|
|
}
|
|
}
|
|
}
|
|
</mat-form-field> |