Old Guides - You are viewing the guides for
Ember
v1.12.0.
Ember comes pre-packaged with a set of views for building basic controls like text inputs, check boxes, and select lists. Usually, these views will be used via the input helpers. However, the base views may be helpful in creating custom form behaviors.
For example, here we have created a custom text field that toggles a dirty property:
app/views/my-input.js
export default Ember.TextField.extend({
inputDidChange: false,
change: function() {
this.set('inputDidChange', true);
}
});
Ember itself provides one additional view not covered by the input helpers, and this is the select box view.
This class can also be customized by extending it. To use the select view bundled with Ember, call it via the view helper:
The select view is extremely feature-rich, and may perform badly when rendering many items. Due to this, it has not yet been converted into an component or helper like other inputs.