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
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
if (ngOptions.trackBy) {
var prev = ngOptions.getTrackByValue(previousValue, ngOptions.trackBy);
var next = ngOptions.getTrackByValue(nextValue, ngOptions.trackBy)
}
And then use angular.equals(prev, next) instead.
I don't have an env. for angular development at the moment, but if you agree that this is an issue, I guess I can set it up and do a PR.
The text was updated successfully, but these errors were encountered:
We do have a test for circular references, but it doesn't use track by, so I think we can expect this to work. If you want to open a PR, we are happy to look at it.
No, not yet. I'll take a look this week if nobody beats me to it. @studds if you want to open a PR with the change suggestion I'll be happy to look at it.
Hi, what is the status of this issue?
I found several issues dealing with the same problem, but none seems to be really closed.
And indeed it seems that the problem still occurs in AngularJS 1.5.8.
BTW, I tried the fix suggested by rasmusvhansen and it works (and seems relevant).
Observed in 1.4.8, but looking at the code, it seems to be an issue in 1.5 as well.
Reproduced here: http://jsfiddle.net/tn102eh8/2/ (1.4.8)
And here: http://jsfiddle.net/tn102eh8/3/ (1.5.0-beta2)
Related to #11372
The issue seems to be that ng-options runs equals(previousValue, nextValue) if trackby is used
https://github.com/angular/angular.js/blob/master/src/ng/directive/ngOptions.js#L737
I think it should do
And then use angular.equals(prev, next) instead.
I don't have an env. for angular development at the moment, but if you agree that this is an issue, I guess I can set it up and do a PR.
The text was updated successfully, but these errors were encountered: