Skip to content

Commit

Permalink
Replace beforeDestroy lifecycle option with beforeUnmount
Browse files Browse the repository at this point in the history
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
  • Loading branch information
rak-phillip committed Oct 18, 2024
1 parent 69e1b26 commit 63e3ce2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion shell/components/SortableTable/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default {
};
},

beforeDestroy() {
beforeUnmount() {
window.removeEventListener('resize', this.onWindowResize);
},

Expand Down
2 changes: 1 addition & 1 deletion shell/components/SortableTable/selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
table.addEventListener('contextmenu', this._onRowContextBound);
},

beforeDestroy() {
beforeUnmount() {
const table = this.$el.querySelector('TABLE');

table.removeEventListener('click', this._onRowClickBound);
Expand Down
2 changes: 1 addition & 1 deletion shell/mixins/browser-tab-visibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default {
mounted() {
this.setTabVisibilityListener(true);
},
beforeDestroy() {
beforeUnmount() {
this.setTabVisibilityListener(false);
},
};
2 changes: 1 addition & 1 deletion shell/mixins/metric-poller.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
this.metricPoller.start();
},

beforeDestroy() {
beforeUnmount() {
this.metricPoller.stop();
},
};
2 changes: 1 addition & 1 deletion shell/mixins/resource-fetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 63e3ce2

Please sign in to comment.