Skip to content
Snippets Groups Projects
Commit 329ecf12 authored by Tifenn Guillas's avatar Tifenn Guillas
Browse files

Fix bug select => DONE

parent c82931e1
No related branches found
No related tags found
2 merge requests!68Develop,!28Bug attribute options
......@@ -2,7 +2,7 @@
<label class="col-3 col-form-label">{{label}}</label>
<div class="col">
<ng-select [formControl]="se" [multiple]="false" [hideSelected]="true">
<ng-option *ngFor="let option of options" [value]="option.id">{{option.label}}</ng-option>
<ng-option *ngFor="let option of options" [value]="option.value">{{option.label}}</ng-option>
</ng-select>
</div>
<div class="col-2 align-self-center text-center">
......
......@@ -22,7 +22,7 @@ export class SelectComponent {
se = new FormControl();
addCriterion() {
const option = this.options.find(o => o.id === this.se.value);
const option = this.options.find(o => o.value === this.se.value);
const se = new SelectCriterion(this.id, option);
this.add.emit(se);
}
......@@ -33,7 +33,7 @@ export class SelectComponent {
this.se.enable();
} else {
const c = criterion as SelectCriterion;
this.se.setValue(c.option.id);
this.se.setValue(c.option.value);
this.se.disable();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment