LP1888723 Support disabling select entries in combobox
[Evergreen.git] / Open-ILS / src / eg2 / src / app / share / combobox / combobox.component.html
1
2 <ng-template #defaultDisplayTemplate let-r="result">
3   <span id="{{domId}}-{{r.id}}">{{r.label}}</span>
4 </ng-template>
5
6 <ng-template #acqfTemplate egIdlClass="acqf" let-r="result">
7   <span id="{{domId}}-{{r.id}}">{{r.fm.code()}} ({{r.fm.year()}}) ({{getOrgShortname(r.fm.org())}})</span>
8 </ng-template>
9 <ng-template #acplTemplate egIdlClass="acpl" let-r="result">
10   <span id="{{domId}}-{{r.id}}">
11     {{r.fm.name()}} ({{getOrgShortname(r.fm.owning_lib())}})
12   </span>
13 </ng-template>
14
15 <div class="d-flex">
16   <input type="text" 
17     class="form-control"
18     [id]="domId"
19     [ngClass]="{
20       'text-success font-italic font-weight-bold': selected && selected.freetext,
21       'form-control-sm': smallFormControl
22     }"
23     [placeholder]="placeholder"
24     [name]="name"
25     [disabled]="isDisabled"
26     [required]="isRequired"
27     [(ngModel)]="selected" 
28     [ngbTypeahead]="filter"
29     [resultTemplate]="getResultTemplate()"
30     [inputFormatter]="formatDisplayString"
31     (click)="onClick($event)"
32     (blur)="onBlur()"
33     (keyup.arrowdown)="onClick($event)"
34     container="body"
35     (selectItem)="selectorChanged($event)"
36     #instance="ngbTypeahead"/>
37   <div class="d-flex flex-column icons" (click)="openMe($event)">
38     <span class="material-icons">keyboard_arrow_up</span>
39     <span class="material-icons">keyboard_arrow_down</span>
40   </div>
41 </div>