combobox bug fix

This commit is contained in:
annampak 2017-12-11 12:48:11 +02:00
parent d0e123c350
commit 0f90e6f56d
1 changed files with 3 additions and 3 deletions

View File

@ -1,14 +1,14 @@
<div class="form-group col-md-12">
<label>Type of Combobox</label>
<select class="form-control" [(ngModel)]="type">
<select class="form-control" [(ngModel)]="dataModel.data!=null?dataModel.data.type:type">
<option *ngFor="let option of options" [value]="option.value">{{option.value}}</option>
</select>
<div class="form-row" [ngSwitch]="type">
<div class="form-row" [ngSwitch]="dataModel.data!=null?dataModel.data.type:type">
<div *ngSwitchCase="'autocomplete'">
<autocomplete-component [form]="form" [dataModel]="dataModel"></autocomplete-component>
</div>
</div>
<div class="form-row" [ngSwitch]="type">
<div class="form-row" [ngSwitch]="dataModel.data!=null?dataModel.data.type:type">
<div *ngSwitchCase="'wordlist'">
<wordlist-component [form]="form" [dataModel]="dataModel"></wordlist-component>
</div>