2019-01-18 18:03:45 +01:00
|
|
|
<div class="row auto-complete">
|
2019-02-15 09:51:21 +01:00
|
|
|
<mat-chip-list #chipList [disabled]="disabled" class="chip-list">
|
2019-02-14 17:56:06 +01:00
|
|
|
<mat-chip *ngIf="value" [removable]="true" (removed)="chipRemove()">
|
2019-09-23 13:06:58 +02:00
|
|
|
<mat-icon matChipRemove *ngIf="_iconFn(value)" class="ml-0 mr-1">{{_iconFn(value)}}</mat-icon>
|
2019-02-14 17:56:06 +01:00
|
|
|
{{_displayFn(value)}}
|
|
|
|
<mat-icon matChipRemove *ngIf="!disabled">cancel</mat-icon>
|
|
|
|
</mat-chip>
|
2019-02-15 09:51:21 +01:00
|
|
|
<input matInput class="col" autocomplete="off" [placeholder]="placeholder" [matAutocomplete]="auto" [ngModel]="_inputValue" (ngModelChange)="_inputValueChange($event)" [disabled]="disabled || (value != null && value !== '')" (focus)="_onInputFocus()" [matChipInputFor]="chipList" [matChipInputSeparatorKeyCodes]="separatorKeysCodes" [matChipInputAddOnBlur]="true">
|
2019-02-14 17:56:06 +01:00
|
|
|
</mat-chip-list>
|
|
|
|
|
2019-02-15 09:51:21 +01:00
|
|
|
<mat-progress-spinner class="progress-loader" mode="indeterminate" [class.not-loading]="!loading" [diameter]="17"></mat-progress-spinner>
|
2019-02-15 12:41:14 +01:00
|
|
|
<mat-autocomplete #auto="matAutocomplete" [displayWith]="autoCompleteDisplayFn()" (optionSelected)="_optionSelected($event)">
|
2019-01-18 18:03:45 +01:00
|
|
|
<span *ngIf="_groupedItems">
|
|
|
|
<mat-optgroup *ngFor="let group of _groupedItems | async" [label]="group.title">
|
|
|
|
<mat-option *ngFor="let item of group.items" [value]="item" [class.two-line-mat-option]="_subtitleFn(item)">
|
|
|
|
<!-- <img style="vertical-align:middle;" aria-hidden src="{{state.flag}}" height="25" /> -->
|
|
|
|
<span>{{_titleFn(item)}}</span>
|
|
|
|
<br *ngIf="_subtitleFn(item)">
|
|
|
|
<small *ngIf="_subtitleFn(item)">{{_subtitleFn(item)}}</small>
|
|
|
|
</mat-option>
|
|
|
|
</mat-optgroup>
|
|
|
|
</span>
|
|
|
|
<span *ngIf="!_groupedItems">
|
|
|
|
<mat-option *ngFor="let item of _items | async" [value]="item" [class.two-line-mat-option]="_subtitleFn(item)">
|
|
|
|
<!-- <img style="vertical-align:middle;" aria-hidden src="{{state.flag}}" height="25" /> -->
|
|
|
|
<span>{{_titleFn(item)}}</span>
|
|
|
|
<br *ngIf="_subtitleFn(item)">
|
|
|
|
<small *ngIf="_subtitleFn(item)">{{_subtitleFn(item)}}</small>
|
|
|
|
</mat-option>
|
|
|
|
</span>
|
|
|
|
</mat-autocomplete>
|
|
|
|
</div>
|