From 3820dca426401587be8c3902a8ca8940948c9a42 Mon Sep 17 00:00:00 2001 From: John Cowen Date: Fri, 17 Jul 2020 09:49:58 +0100 Subject: [PATCH] ui: Change some components to use willDestroyElement vs willDestroy (#8313) * ui: Change to use willDestroyElement vs willDestroy * Change 3 more components to use willDestroyElement vs willDestroy --- ui-v2/app/components/data-sink/index.js | 2 +- ui-v2/app/components/data-source/index.js | 3 ++- ui-v2/app/components/jwt-source/index.js | 2 +- ui-v2/app/components/state-chart/guard/index.js | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ui-v2/app/components/data-sink/index.js b/ui-v2/app/components/data-sink/index.js index 380527a135..c3e463d69b 100644 --- a/ui-v2/app/components/data-sink/index.js +++ b/ui-v2/app/components/data-sink/index.js @@ -44,7 +44,7 @@ export default Component.extend({ this._super(...arguments); this._listeners = this.dom.listeners(); }, - willDestroy: function() { + willDestroyElement: function() { this._super(...arguments); this._listeners.remove(); }, diff --git a/ui-v2/app/components/data-source/index.js b/ui-v2/app/components/data-source/index.js index 4a41d22c55..8ee8a796b9 100644 --- a/ui-v2/app/components/data-source/index.js +++ b/ui-v2/app/components/data-source/index.js @@ -45,10 +45,11 @@ export default Component.extend({ this._lazyListeners = this.dom.listeners(); this.guid = this.dom.guid(this); }, - willDestroy: function() { + willDestroyElement: function() { this.actions.close.apply(this); this._listeners.remove(); this._lazyListeners.remove(); + this._super(...arguments); }, didInsertElement: function() { diff --git a/ui-v2/app/components/jwt-source/index.js b/ui-v2/app/components/jwt-source/index.js index da84dc672c..c4da73b58c 100644 --- a/ui-v2/app/components/jwt-source/index.js +++ b/ui-v2/app/components/jwt-source/index.js @@ -12,7 +12,7 @@ export default Component.extend({ this._super(...arguments); this._listeners = this.dom.listeners(); }, - willDestroy: function() { + willDestroyElement: function() { this._super(...arguments); this.repo.close(); this._listeners.remove(); diff --git a/ui-v2/app/components/state-chart/guard/index.js b/ui-v2/app/components/state-chart/guard/index.js index 1eb060f5bf..e5f6500297 100644 --- a/ui-v2/app/components/state-chart/guard/index.js +++ b/ui-v2/app/components/state-chart/guard/index.js @@ -13,7 +13,7 @@ export default Component.extend({ } }); }, - willDestroy: function() { + willDestroyElement: function() { this._super(...arguments); this.chart.removeGuard(this.name); },