fix(ngOptions): set select value when model matches disabled option
When ngModel is set to a value that matches a disabled option, ngOptions will now select the option in the select element, which will set select.val() to the option hash value and visually show the option value / label as selected in the select box. Previously, disabled options forced the unknown value. The previous behavior is inconsistent with both default HTML behavior and select with ngModel but without ngOptions. Both allow disabled values to be selected programmatically. A common use case for this behavior is an option that was previously valid, but has been disabled, and cannot be selected again. This commit removes a duplicate test, and all other tests that previously checked that disabled options are not set have been adjusted to the ensure the opposite. Fixes #12756
M
Martin Staffa committed
3b05c484af074f0c7c050b0f9824099d627e178f
Parent: 71cf28c