Migration path for views extending Ember.Checkbox


#1

In Ember 1.13.x, Ember.Checkbox extends Ember.View while in 2.x it extends Ember.Component. I have a 1.13.x app that uses a customized radio input that is extending Ember.Checkbox. But I don’t see a way to get rid of the {{view}} deprecation warning, because I don’t have the Ember.Component-derived checkbox functionality.

Thoughts on how I should proceed?

I would rather not reinvent the checkbox as my own component, but I don’t want to upgrade to 2.x until I can get rid of all these deprecation notices.


#2

Well someone needs to, however there are many options out there. http://emberaddons.com

With 2.0, the need for the input helper and backing views isn’t really needed, it’s more convenience and there for likely doesn’t belong in the framework since they’re not focusing on shipping UI widgets. A basic <input /> tag with an action bound to the change attribute can be used or you can use something like what I threw together below.

Here is mine:


#3

Ah, Thanks @jasonmit. I didn’t realize so little of the original Ember.Checkbox was no longer needed. What I was trying to avoid was duplicating the view logic which would become a component in ember 2.x, but now I agree this hardly seems needed. I was able to refactor my uses of my derived components in just a few minutes.