**I'm submitting a ...** ``` [x] bug report => search github for a similar issue or PR before submitting ``` **Current behavior** When using ngModel and trackBy in `<select>` the initial value is not selected when it is an object. **Expected behavior** Initial value should be selected. **Minimal reproduction of the problem with instructions** HTML: ``` <select [(ngModel)]="selectedItem"> <option *ngFor="let item of items; trackBy:itemIdentity" [value]="item"> {{item.name}} </option> </select> ``` TS: ``` private items = [{id: 0, name: 'first'}, {id: 1, name: 'second'}]; private selectedItem = {id: 1, name: 'second'}; itemIdentity(index:number, item:any):any { return item.id; } ``` * **Angular version:** 2.4.1 * **Browser:** Chrome * **Language:** TypeScript X.X
Activity
DzmitryShylovich commentedon Jan 7, 2017
Select doesn't use
trackByfunction fromngForfor comparing options.Duplicate of #13268
DzmitryShylovich commentedon Feb 1, 2017
@pkozlowski-opensource was fixed here #13349
pkozlowski-opensource commentedon Feb 1, 2017
Fixed via f89d004, thnx @DzmitryShylovich
angular-automatic-lock-bot commentedon Sep 10, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.