Skip to content

Commit

Permalink
re-render in willUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
toddjordan committed Aug 19, 2016
1 parent b839864 commit 47cf4b4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion addon/components/dynamic-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ const DynamicForm = Ember.Component.extend({
},

_render() {
Ember.Logger.debug('_render');
let renderer = get(this, 'formRenderer');
renderer.render(get(this, 'renderSchema'), this.$());
},
Expand All @@ -41,6 +42,7 @@ const DynamicForm = Ember.Component.extend({

didReceiveAttrs() {
this._super(...arguments);
Ember.Logger.debug('didReceiveAttrs');
let buildSchema = _.flow([
_.bind(this._initSchema, this),
_.bind(this._processData, this),
Expand All @@ -52,7 +54,9 @@ const DynamicForm = Ember.Component.extend({
set(this, 'renderSchema', buildSchema(get(this, 'schema')));
},

didUpdateAttrs() {
willUpdate() {
this._super(...arguments);
Ember.Logger.debug('willUpdate');
this._render();
},

Expand Down

0 comments on commit 47cf4b4

Please sign in to comment.