Skip to content

Commit

Permalink
Fix Ember deprecation/performance warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
GUI committed Apr 23, 2017
1 parent 53c809c commit 3e01914
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/api-umbrella/admin-ui/app/components/select-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import Ember from 'ember';

export default Ember.Component.extend({
didRender() {
this.updateDefault();
// Defer update to within the run loop, to prevent ember warnings about
// updates within the actual rendering (which can cause poor performance).
Ember.run.once(this, this.updateDefault);
},

// If a select menu doesn't have a value set on the model, set it to the
Expand Down

0 comments on commit 3e01914

Please sign in to comment.