You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you change the datasource used to generate the options, the selected value should be kept. It already works like this for primitive options' values. For complex options' values, something like *ngFor's trackByFunction could take care of which attribute would define whether one of the new options is equals to the one already selected.
What is the current behavior?
When the options' values are not primitive types and you change the options' datasource, the selected value is unset even if it's present in the new datasource.
In the plunk, select an option and then click on the reload datasource button. The selected value will not be kept.
What is the use-case or motivation for changing an existing behavior?
It would simplify the developer's code if something like trackBy="'id'" or trackBy="'owner.personalDocuments.socialSecurityNumber'" was possible to do.
Reacted by Peyman Ebrahimi, Vincent Simard, Salvador Faria, R.karthikeyan, Oleksandr Isaryk, Jenish Gnanasighamani, Lev Kovalenko, Johannes Jablonski, Natanael Osorio, Oscar Diaz and 4 more
Reacted by R.karthikeyan
Reacted by Ali Demirci, Will Sharp, R.karthikeyan and Martin Simoneau
Reacted by R.karthikeyan, Lev Kovalenko, Natanael Osorio, Oscar Diaz and ameernajath
Activity
rafaelss95 commentedon Sep 10, 2017
That's what
compareWithis for:Check this working here
julianobrasil commentedon Sep 10, 2017
Oh, in this case... closing this issue. Thanks.
angular-automatic-lock-bot commentedon Sep 7, 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.