Skip to content

Commit

Permalink
Remove depercation caused changing data in didRender
Browse files Browse the repository at this point in the history
This fixes #66. I ended up having to move the way we register x-option
with it's parent component into an ember after render run loop.
  • Loading branch information
Robdel12 committed Aug 14, 2015
1 parent d2cde49 commit c6b7617
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions addon/components/x-option.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ export default Ember.Component.extend({
* @override
*/
didRender() {
Ember.run.scheduleOnce('afterRender', this, 'registerWithXSelect');
},

registerWithXSelect() {
var select = this.nearestOfType(XSelectComponent);
Ember.assert("x-option component declared without enclosing x-select", !!select);
this.set('select', select);
Expand Down

0 comments on commit c6b7617

Please sign in to comment.