aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-forms/select/select-custom-value.component.html
blob: 9dc8c2ec20663a18f1ed70ed3b2a6808c7b89804 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<div class="root">
  <my-select-options
    [items]="itemsWithCustom"
    [clearable]="clearable"
    [searchable]="searchable"
    [groupBy]="groupBy"
    [labelForId]="labelForId"

    [(ngModel)]="selectedId"
    (ngModelChange)="onModelChange()"
  ></my-select-options>

  <ng-container *ngIf="isCustomValue()">
    <input [(ngModel)]="customValue" (ngModelChange)="onModelChange()" [type]="inputType" class="form-control" />

    <span *ngIf="inputSuffix" class="input-suffix">{{ inputSuffix }}</span>
  </ng-container>
</div>