select + ng:options does not show all options
When changing the number of options available in a select which uses ng:options all options are not always visible.
See http://jsfiddle.net/pzwQY/6/ for an example. Change from "colors" to "pets" and back to "colors", the second select will now only show 2 of the 4 colors.
This can also be seen on your example of ng:options at http://docs.angularjs.org/#!/api/angular.directive.ng:options. Remove an option and a new one. The last option will not be visible.
Unless I am misunderstanding the issue, this works as intended. See http://jsfiddle.net/HucLQ/
- select colors and red and notice that the value=red
- change colors to pets, and notice that value=red (no change as expected) but the ng:option does not have red in its list, so it resorts do displaying blank.
This is the intended behavior.
Try this:
- open http://jsfiddle.net/HucLQ/
- check the second select options: red, green, blue, purple
- change the first select to "pets"
- check the second select options: cat, dog
- change the first select back to "colors"
- check the second select options: red, green (there are only first 2 options displayed) !!!
I think it does look a bit buggy when the last two options just disappears after switching back to colors from pet
I understand now. Please include better repro steps next time. :-)