multi-select means: choose n from M, and it has an undetermined state

Tags:

No documentation yet

Authors:Zhicheng Wang

<div #checker="uiMultiSelect" [(ngModel)]="selection" [uiMultiSelectTransformer]="getCode" [uiMultiSelect]="options">
  <div class="card">
    <div class="card-header">
      <div class="form-check form-check-inline">
        <label class="form-check-label">
          <input [(ngModel)]="checker.allSelected" [indeterminate]="checker.indeterminate" class="form-check-input"
                 type="checkbox"/>
          <span i18n>All</span>
        </label>
      </div>
    </div>
    <div class="card-body">
      <div *ngFor="let option of checker.options" class="form-check form-check-inline">
        <label class="form-check-label">
          <input (ngModelChange)="checker.selectAs(option, $event)" [ngModel]="checker.selected(option)"
                 class="form-check-input"
                 type="checkbox"/>
          {{option.label}}
        </label>
      </div>
    </div>
  </div>
  <app-json-viewer [value]="selection"></app-json-viewer>
</div>