Skip to content

Commit

Permalink
Fixed bug where custom id/textfields were ignored (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
linusbrolin authored and valorkin committed Jan 17, 2017
1 parent de2f495 commit 95397f6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions components/select/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@ export class SelectComponent implements OnInit, ControlValueAccessor {
this._items = this.itemObjects = [];
} else {
this._items = value.filter((item:any) => {
// if ((typeof item === 'string' && item) || (typeof item === 'object' && item && item.text && item.id)) {
if ((typeof item === 'string') || (typeof item === 'object' && item.text)) {
if ((typeof item === 'string') || (typeof item === 'object' && item && item[this.textField] && item[this.idField])) {
return item;
}
});
Expand Down

0 comments on commit 95397f6

Please sign in to comment.