25 lines
1.4 KiB
HTML
25 lines
1.4 KiB
HTML
|
<div class="row auto-complete">
|
||
|
<input matInput class="col" autocomplete="off" [placeholder]="placeholder" [matAutocomplete]="auto" [ngModel]="_inputValue" (ngModelChange)="_inputValueChange($event)" [disabled]="disabled" (focus)="_onInputFocus()">
|
||
|
<mat-progress-spinner mode="indeterminate" [class.not-loading]="!loading" [diameter]="17"></mat-progress-spinner>
|
||
|
<mat-autocomplete #auto="matAutocomplete" [displayWith]="_displayFn.bind(this)" (optionSelected)="_optionSelected($event)">
|
||
|
<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>
|