2018-02-14 11:38:19 +01:00
|
|
|
<mat-form-field>
|
2018-07-11 15:47:36 +02:00
|
|
|
<mat-chip-list #chipList [required]="required">
|
|
|
|
<mat-chip *ngFor="let item of selectedItems" (remove)="remove(item)">
|
|
|
|
{{item.name}}
|
|
|
|
<mat-icon matChipRemove>cancel</mat-icon>
|
|
|
|
</mat-chip>
|
|
|
|
<input matInput [matChipInputFor]="chipList" [matAutocomplete]="auto" [formControl]="control" placeholder="{{placeholder}}"
|
|
|
|
[required]="required" #chipInput>
|
|
|
|
</mat-chip-list>
|
|
|
|
<mat-error *ngIf="control['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]="displayWith.bind(this)" (optionSelected)="this.optionSelected($event)">
|
|
|
|
<mat-option *ngFor="let item of filteredItems " [value]="item">
|
|
|
|
<span *ngIf="titleKey">{{item[titleKey]}}</span>
|
|
|
|
<span *ngIf="subtitleKey">{{item[subtitleKey]}}</span>
|
|
|
|
</mat-option>
|
|
|
|
<!-- <mat-option *ngIf="filteredItems.length == 0" value="das">
|
2018-02-14 11:38:19 +01:00
|
|
|
<span>{{'GENERAL.AUTOCOMPLETE.NO-ITEMS' | translate}}</span>
|
|
|
|
</mat-option> -->
|
2018-07-11 15:47:36 +02:00
|
|
|
</mat-autocomplete>
|
|
|
|
</mat-form-field>
|