2018-03-28 15:24:47 +02:00
|
|
|
<div class="auto-complete">
|
2018-05-28 11:50:42 +02:00
|
|
|
<mat-form-field>
|
|
|
|
<input matInput type="text" [placeholder]="placeholder" [formControl]="textFormCtrl" [matAutocomplete]="auto" [required]="required"
|
|
|
|
[errorStateMatcher]="this">
|
|
|
|
<mat-error *ngIf="validationErrorString">{{validationErrorString}}</mat-error>
|
|
|
|
<mat-error *ngIf="formCtrl && formCtrl.errors?.required">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
<mat-progress-spinner matSuffix mode="indeterminate" *ngIf="loading" [diameter]="22"></mat-progress-spinner>
|
|
|
|
<mat-autocomplete #auto="matAutocomplete" [displayWith]="displayFunction" (optionSelected)="this.optionSelected($event)">
|
|
|
|
<mat-option *ngFor="let option of options" [value]="option">
|
2018-07-11 15:47:36 +02:00
|
|
|
{{ this.printText(option) }} |
|
|
|
|
<small *ngIf="_subtitleFn">{{subtitleFn(option)}}</small>
|
2018-05-28 11:50:42 +02:00
|
|
|
</mat-option>
|
|
|
|
</mat-autocomplete>
|
|
|
|
</mat-form-field>
|
2018-03-28 15:24:47 +02:00
|
|
|
</div>
|