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 has been archived by the owner on Apr 12, 2024. It is now read-only.
When adding options with ngRepeat, if one of the options has ngValue="undefined" and ngModel is currently undefined, AngularJS still adds the unknown model option with value "? undefined:undefined ?" instead of the element with value "undefined:undefined" being selected. Moreover, if we select the element with value "undefined:undefined" the model is set to null instead of being undefined. For all the remaining values the behavior is as expected.
Expected / new behavior:
We expected that the option with value "? undefined:undefined ?" would not be added by AngularJS and that the selected option would be the one with ngValue="undefined". Also, we expected the ngModel to be set to undefined when that same option with ngValue="undefined" is selected.
Minimal reproduction of the problem with instructions:
Browser: [all | Chrome XX | Firefox XX | Edge XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
all Anything else:
The text was updated successfully, but these errors were encountered:
Previously, the value observer incorrectly assumed a value had changed even if
it was the first time it was set, which caused it to remove an option with
the value `undefined` from the internal option map.
Fixesangular#16653
Previously, the value observer incorrectly assumed a value had changed even if
it was the first time it was set, which caused it to remove an option with
the value `undefined` from the internal option map.
Fixes#16653Closes#16656
Previously, the value observer incorrectly assumed a value had changed even if
it was the first time it was set, which caused it to remove an option with
the value `undefined` from the internal option map.
Fixes#16653Closes#16656
kfeinUI
pushed a commit
to kfeinUI/angular.js
that referenced
this issue
Aug 14, 2018
Previously, the value observer incorrectly assumed a value had changed even if
it was the first time it was set, which caused it to remove an option with
the value `undefined` from the internal option map.
Fixesangular#16653Closesangular#16656
I'm submitting a ...
Current behavior:
When adding options with ngRepeat, if one of the options has ngValue="undefined" and ngModel is currently undefined, AngularJS still adds the unknown model option with value "? undefined:undefined ?" instead of the element with value "undefined:undefined" being selected. Moreover, if we select the element with value "undefined:undefined" the model is set to null instead of being undefined. For all the remaining values the behavior is as expected.
Expected / new behavior:
We expected that the option with value "? undefined:undefined ?" would not be added by AngularJS and that the selected option would be the one with ngValue="undefined". Also, we expected the ngModel to be set to undefined when that same option with ngValue="undefined" is selected.
Minimal reproduction of the problem with instructions:
https://plnkr.co/edit/5jIspWCuuMFl5CEhHexD?p=preview
AngularJS version: 1.6.x, 1.7.x
Browser: [all | Chrome XX | Firefox XX | Edge XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
all
Anything else:
The text was updated successfully, but these errors were encountered: