2020-12-17 23:09:27 -08:00
|
|
|
<div class="form-group paperless-input-select">
|
2020-10-28 18:02:30 +01:00
|
|
|
<label [for]="inputId">{{title}}</label>
|
2020-10-28 20:21:00 +01:00
|
|
|
<div [class.input-group]="showPlusButton()">
|
2020-12-21 18:15:28 +01:00
|
|
|
<ng-select name="inputId" [(ngModel)]="value"
|
2020-12-17 23:09:27 -08:00
|
|
|
[disabled]="disabled"
|
|
|
|
|
[style.color]="textColor"
|
|
|
|
|
[style.background]="backgroundColor"
|
2020-12-22 13:39:46 +01:00
|
|
|
[clearable]="allowNull"
|
2021-01-10 01:59:47 +01:00
|
|
|
[items]="items"
|
|
|
|
|
bindLabel="name"
|
|
|
|
|
bindValue="id"
|
2020-12-17 23:09:27 -08:00
|
|
|
(change)="onChange(value)"
|
|
|
|
|
(blur)="onTouched()">
|
|
|
|
|
</ng-select>
|
|
|
|
|
|
2020-10-28 20:21:00 +01:00
|
|
|
<div *ngIf="showPlusButton()" class="input-group-append">
|
|
|
|
|
<button class="btn btn-outline-secondary" type="button" (click)="createNew.emit()">
|
|
|
|
|
<svg class="buttonicon" fill="currentColor">
|
|
|
|
|
<use xlink:href="assets/bootstrap-icons.svg#plus" />
|
|
|
|
|
</svg>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2020-10-28 18:02:30 +01:00
|
|
|
<small *ngIf="hint" class="form-text text-muted">{{hint}}</small>
|
2020-12-17 23:09:27 -08:00
|
|
|
</div>
|