This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
select
with disabled option in model: value not showing in closed state #12756
Closed
Description
Overview of the Issue
When using select
with ngOptions' disable
keyword, and the model value is one that is disabled through the ngOptions directive, the select element doesn't show the model value.
The UI should show the value, but upon opening the select dropdown, the value should appear disabled.
What actually happens is, that the select shows as if there was no value in the model.
Motivation for or Use Case
A model value can come from a record in a database, e.g. an option that was valid but no longer. In this case, the select doubles as display and input element. Due to this, it doesn't display a disabled value.
Angular Version(s)
1.4.5 (as disable
is new to 1.4)
Browsers and Operating System
Tested on OS X 10.10 Chrome, FF, Safari
Reproduce the Error
http://plnkr.co/edit/unjDAvAUnBimn29URkSP?p=preview
Related Issues
Possibly #11762