From 33792e4d35f7182df39dfd58e4130805710e8189 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Fri, 29 Jun 2018 16:54:06 +1000 Subject: [PATCH] Re-apply sortable when links change --- .../javascripts/discourse/components/wizard-links.js.es6 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/discourse/components/wizard-links.js.es6 b/assets/javascripts/discourse/components/wizard-links.js.es6 index 431512d4..291f617c 100644 --- a/assets/javascripts/discourse/components/wizard-links.js.es6 +++ b/assets/javascripts/discourse/components/wizard-links.js.es6 @@ -1,11 +1,15 @@ -import { default as computed } from 'ember-addons/ember-computed-decorators'; +import { default as computed, on, observes } from 'ember-addons/ember-computed-decorators'; export default Ember.Component.extend({ classNames: 'wizard-links', items: Ember.A(), + @on('didInsertElement') + @observes('links.@each') didInsertElement() { - this.applySortable(); + Ember.run.scheduleOnce('afterRender', () => { + this.applySortable(); + }); }, applySortable() {