How to add disabled attribute to options in Ember.Select?

Posted by Jennifer | Updated on

Want to add disabled attribute to options in Ember.Select? The Ember.Select view doesn’t do this out of the box. You will need to add a custom attribute binding for disabled and a corresponding computed property to tell Ember how to find it.

A simple approach is to add the disabled attribute on the content/data item used to render the select.

and reopen or extend the Ember.SelectOption view adding the disabled attribute and computed property.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers