ui: Change some components to use willDestroyElement vs willDestroy (#8313)

* ui: Change <DataSource /> to use willDestroyElement vs willDestroy

* Change 3 more components to use willDestroyElement vs willDestroy
This commit is contained in:
John Cowen 2020-07-17 09:49:58 +01:00 committed by GitHub
parent d17cc4044d
commit 287e4f591f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 4 deletions

View File

@ -44,7 +44,7 @@ export default Component.extend({
this._super(...arguments); this._super(...arguments);
this._listeners = this.dom.listeners(); this._listeners = this.dom.listeners();
}, },
willDestroy: function() { willDestroyElement: function() {
this._super(...arguments); this._super(...arguments);
this._listeners.remove(); this._listeners.remove();
}, },

View File

@ -45,10 +45,11 @@ export default Component.extend({
this._lazyListeners = this.dom.listeners(); this._lazyListeners = this.dom.listeners();
this.guid = this.dom.guid(this); this.guid = this.dom.guid(this);
}, },
willDestroy: function() { willDestroyElement: function() {
this.actions.close.apply(this); this.actions.close.apply(this);
this._listeners.remove(); this._listeners.remove();
this._lazyListeners.remove(); this._lazyListeners.remove();
this._super(...arguments);
}, },
didInsertElement: function() { didInsertElement: function() {

View File

@ -12,7 +12,7 @@ export default Component.extend({
this._super(...arguments); this._super(...arguments);
this._listeners = this.dom.listeners(); this._listeners = this.dom.listeners();
}, },
willDestroy: function() { willDestroyElement: function() {
this._super(...arguments); this._super(...arguments);
this.repo.close(); this.repo.close();
this._listeners.remove(); this._listeners.remove();

View File

@ -13,7 +13,7 @@ export default Component.extend({
} }
}); });
}, },
willDestroy: function() { willDestroyElement: function() {
this._super(...arguments); this._super(...arguments);
this.chart.removeGuard(this.name); this.chart.removeGuard(this.name);
}, },