Skip to content

Commit

Permalink
Merge branch 'lpotapczuk-development' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
valorkin committed Jan 17, 2017
2 parents 5c3a4e1 + bf1e62a commit b133c73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/select/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ export class SelectComponent implements OnInit, ControlValueAccessor {
@Input() public placeholder:string = '';
@Input() public idField:string = 'id';
@Input() public textField:string = 'text';
@Input() public childrenField:string = 'children';
@Input() public multiple:boolean = false;

@Input()
Expand All @@ -269,8 +270,7 @@ export class SelectComponent implements OnInit, ControlValueAccessor {
return item;
}
});
// this.itemObjects = this._items.map((item:any) => (typeof item === 'string' ? new SelectItem(item) : new SelectItem({id: item[this.idField], text: item[this.textField]})));
this.itemObjects = this._items.map((item:any) => new SelectItem(item));
this.itemObjects = this._items.map((item:any) => (typeof item === 'string' ? new SelectItem(item) : new SelectItem({id: item[this.idField], text: item[this.textField], children: item[this.childrenField]})));
}
}

Expand Down

0 comments on commit b133c73

Please sign in to comment.