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.
In the select directive there is a deep watch that calls $render if $viewValue deep-changes. This happens either if it changes inside or if it's reference changed.
It should only call $render in the first cases.
If the reference of $viewValue changes than this call is redundant because the shallow watch in ngModel will call $render.
I suggest something like:
var lastView, lastViewRef = NaN;
scope.$watch(fucntion() {
if (lastViewRef === ngModelCtrl.$viewValue and !equals(lastView, ngModelCtrl.$viewValue)) {
lastView = shallowCopy(modelCtrl.$viewValue);
modelCtrl.$render();
}
lastViewRef = ngModelCtrl.$viewValue;
})