1 <ng-template #popTemplate>
6 <div [ngClass]="{'has-error': form.showError('filter', formDir)}">
8 formControlName="filter"
10 [placeholder]="messages.filter"
11 (keyup)="$event.keyCode == 13 ? selectOption() : updateFilter()"
12 class="form-control text-center" />
13 <ng-container *ngFor="let error of Object.keys(messages.customValidations)">
14 <span class="help-block text-center"
15 *ngIf="form.showError('filter', formDir) && filter.hasError(error)">
16 {{ messages.customValidations[error] }}
21 <div *ngFor="let option of filteredOptions"
22 class="select-menu-item"
23 [class.disabled]="data.length === selectionLimit && !option.selected"
24 (click)="triggerSelection(option)">
25 <div class="select-menu-item-icon">
26 <i class="fa fa-check"
28 *ngIf="option.selected"></i>
31 <div class="select-menu-item-content">
33 <ng-container *ngIf="option.description">
35 <small class="text-muted">
36 {{ option.description }}
41 <div *ngIf="isCreatable()"
42 class="select-menu-item"
43 (click)="addCustomOption(filter.value)">
44 <div class="select-menu-item-icon">
46 aria-hidden="true"></i>
49 <div class="select-menu-item-content">
50 {{ messages.add }} '{{ filter.value }}'
53 <div class="has-warning"
54 *ngIf="data.length === selectionLimit">
55 <span class="help-block text-center text-warning"
56 [tooltip]="messages.selectionLimit.tooltip"
57 *ngIf="data.length === selectionLimit">
58 {{ messages.selectionLimit.text }}
63 <a class="margin-right-sm select-menu-edit"
64 [popover]="popTemplate"
68 <i class="fa fa-fw fa-pencil"></i>
70 <span class="text-muted"
71 *ngIf="data.length === 0">
74 <span *ngFor="let dataItem of data">
75 <span class="badge badge-pill badge-primary margin-right-sm">
76 <span class="margin-right-sm">{{ dataItem }}</span>
77 <a class="badge-remove"
78 (click)="removeItem(dataItem)">
79 <i class="fa fa-times"
80 aria-hidden="true"></i>