argos/dmp-frontend/src/app/shared/components/auto-complete/auto-complete.component.html

16 lines
905 B
HTML
Raw Normal View History

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>
2018-11-27 18:33:17 +01:00
<mat-error *ngIf="formCtrl && formCtrl.hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
2018-05-28 11:50:42 +02:00
<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>