From 63e3ce24320062b179b5f4613111bb49c762b0c1 Mon Sep 17 00:00:00 2001 From: Phillip Rak Date: Fri, 18 Oct 2024 13:12:54 -0700 Subject: [PATCH] Replace `beforeDestroy` lifecycle option with `beforeUnmount` Signed-off-by: Phillip Rak --- shell/components/SortableTable/actions.js | 2 +- shell/components/SortableTable/selection.js | 2 +- shell/mixins/browser-tab-visibility.js | 2 +- shell/mixins/metric-poller.js | 2 +- shell/mixins/resource-fetch.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/shell/components/SortableTable/actions.js b/shell/components/SortableTable/actions.js index 55f3bb4b754..725f8b1f8bf 100644 --- a/shell/components/SortableTable/actions.js +++ b/shell/components/SortableTable/actions.js @@ -18,7 +18,7 @@ export default { }; }, - beforeDestroy() { + beforeUnmount() { window.removeEventListener('resize', this.onWindowResize); }, diff --git a/shell/components/SortableTable/selection.js b/shell/components/SortableTable/selection.js index 9a3eaea5d6a..c76b9db42d3 100644 --- a/shell/components/SortableTable/selection.js +++ b/shell/components/SortableTable/selection.js @@ -20,7 +20,7 @@ export default { table.addEventListener('contextmenu', this._onRowContextBound); }, - beforeDestroy() { + beforeUnmount() { const table = this.$el.querySelector('TABLE'); table.removeEventListener('click', this._onRowClickBound); diff --git a/shell/mixins/browser-tab-visibility.js b/shell/mixins/browser-tab-visibility.js index 0e346a3532b..c8444cefe1e 100644 --- a/shell/mixins/browser-tab-visibility.js +++ b/shell/mixins/browser-tab-visibility.js @@ -25,7 +25,7 @@ export default { mounted() { this.setTabVisibilityListener(true); }, - beforeDestroy() { + beforeUnmount() { this.setTabVisibilityListener(false); }, }; diff --git a/shell/mixins/metric-poller.js b/shell/mixins/metric-poller.js index da1d960c48c..261d53670e6 100644 --- a/shell/mixins/metric-poller.js +++ b/shell/mixins/metric-poller.js @@ -13,7 +13,7 @@ export default { this.metricPoller.start(); }, - beforeDestroy() { + beforeUnmount() { this.metricPoller.stop(); }, }; diff --git a/shell/mixins/resource-fetch.js b/shell/mixins/resource-fetch.js index d648db48c47..60f1770e6c7 100644 --- a/shell/mixins/resource-fetch.js +++ b/shell/mixins/resource-fetch.js @@ -48,7 +48,7 @@ export default { }; }, - beforeDestroy() { + beforeUnmount() { // make sure this only runs once, for the initialized instance if (this.init) { // clear up the store to make sure we aren't storing anything that might interfere with the next rendered list view