Replaces beforeDestroy with beforeUnmount
This commit is contained in:
parent
5cb9398926
commit
d9b2b51714
|
@ -254,7 +254,7 @@ export default {
|
|||
this.updateExtraFormData(this.form);
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
if (this.closedByForm) {
|
||||
this.$emit('onUpdateSavedState', true);
|
||||
} else {
|
||||
|
|
|
@ -437,7 +437,7 @@ export default {
|
|||
this.collection = collection;
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
// Cancels previous Request
|
||||
if (this.metadataSearchCancel != undefined)
|
||||
this.metadataSearchCancel.cancel('Metadata search Canceled.');
|
||||
|
|
|
@ -1089,7 +1089,7 @@ export default {
|
|||
if (this.$adminOptions.mobileAppMode)
|
||||
this.isMobileSubheaderOpen = true;
|
||||
},
|
||||
beforeDestroy () {
|
||||
beforeUnmount () {
|
||||
eventBusItemMetadata.$off('isUpdatingValue');
|
||||
eventBusItemMetadata.$off('hasErrorsOnForm');
|
||||
eventBusItemMetadata.$off('isOnFirstMetadatumOfCompoundNavigation');
|
||||
|
|
|
@ -205,7 +205,7 @@ export default {
|
|||
this.$refs['item-edition-footer-dropdown'].toggle();
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
this.$parent.$off('toggleItemEditionFooterDropdown');
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -101,7 +101,7 @@
|
|||
created() {
|
||||
this.$eventBusSearch.$on('has-to-reload-facets', this.reloadOptions);
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
this.$eventBusSearch.$off('has-to-reload-facets', this.reloadOptions);
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
created() {
|
||||
this.$eventBusSearch.$on('has-to-reload-facets', this.reloadOptions);
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
this.$eventBusSearch.$off('has-to-reload-facets', this.reloadOptions);
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
if (!this.isUsingElasticSearch)
|
||||
this.loadOptions();
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
|
||||
// Cancels previous Request
|
||||
if (this.getOptionsValuesCancel != undefined)
|
||||
|
|
|
@ -592,7 +592,7 @@ export default {
|
|||
this.isLoadingMetadataSections = false;
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
// Cancels previous Request
|
||||
if (this.metadataSearchCancel != undefined)
|
||||
this.metadataSearchCancel.cancel('Metadata search Canceled.');
|
||||
|
|
|
@ -397,7 +397,7 @@
|
|||
jQuery( document ).on( 'heartbeat-tick', this.onHeartBitTickList);
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
if (jQuery && jQuery( document )) {
|
||||
jQuery( document ).off( 'heartbeat-tick', this.onHeartBitTickList)
|
||||
}
|
||||
|
|
|
@ -337,7 +337,7 @@ export default {
|
|||
this.loadMetadata();
|
||||
this.$eventBusMetadataList.$on('addMetadatumViaButton', this.addMetadatumViaButton);
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
// Cancels previous Request
|
||||
if (this.metadataSearchCancel != undefined)
|
||||
this.metadataSearchCancel.cancel('Metadata search Canceled.');
|
||||
|
|
|
@ -320,7 +320,7 @@ export default {
|
|||
this.$parent.$on('deleteSelectedTerms', this.deleteSelectedTerms);
|
||||
this.$parent.$on('updateSelectedTermsParent', this.updateSelectedTermsParent);
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
this.$parent.$off('deleteSelectedTerms', this.deleteSelectedTerms);
|
||||
this.$parent.$off('updateSelectedTermsParent', this.updateSelectedTermsParent);
|
||||
},
|
||||
|
|
|
@ -185,7 +185,7 @@
|
|||
eventBusItemMetadata.$on('focusPreviousChildMetadatum', this.focusPreviousChildMetadatum);
|
||||
eventBusItemMetadata.$on('focusNextChildMetadatum', this.focusNextChildMetadatum);
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
eventBusItemMetadata.$off('hasRemovedItemMetadataGroup', this.laterUpdateIsRemovingGroup);
|
||||
eventBusItemMetadata.$off('focusPreviousChildMetadatum', this.focusPreviousChildMetadatum);
|
||||
eventBusItemMetadata.$off('focusNextChildMetadatum', this.focusNextChildMetadatum);
|
||||
|
|
|
@ -300,7 +300,7 @@
|
|||
else
|
||||
this.collectionId = this.$route.params.collectionId;
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
|
||||
// Cancels previous Request
|
||||
if (this.metadataSearchCancel != undefined)
|
||||
|
|
|
@ -206,7 +206,7 @@
|
|||
this.handleWindowResize(mapComponentRef);
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
const mapComponentRef = 'map--' + this.itemMetadatumIdentifier;
|
||||
eventBusItemMetadata.$off('itemEditionFormResize', () => this.handleWindowResize(mapComponentRef));
|
||||
},
|
||||
|
|
|
@ -224,7 +224,7 @@
|
|||
this.errorMessage = updatedErrorMessage;
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
if (this.itemMetadatum && this.itemMetadatum.metadatum) {
|
||||
eventBusItemMetadata.$off('updateErrorMessageOf#' + (this.itemMetadatum.parent_meta_id ? this.itemMetadatum.metadatum.id + '-' + this.itemMetadatum.parent_meta_id : this.itemMetadatum.metadatum.id));
|
||||
}
|
||||
|
|
|
@ -396,7 +396,7 @@
|
|||
if (this.$refs.bulkEditionModal)
|
||||
this.$refs.bulkEditionModal.focus();
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
// Cancels previous Request
|
||||
if (this.metadataSearchCancel != undefined)
|
||||
this.metadataSearchCancel.cancel('Metadata search Canceled.');
|
||||
|
|
|
@ -134,7 +134,7 @@
|
|||
this.showProcesses = true;
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
this.$root.$off('openProcessesPopup');
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -98,7 +98,7 @@ export default {
|
|||
|
||||
this.$root.$on('onCollectionBreadCrumbUpdate', this.collectionBreadCrumbUpdate);
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
this.$root.$on('onCollectionBreadCrumbUpdate', this.collectionBreadCrumbUpdate);
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -413,7 +413,7 @@
|
|||
if (this.isModal && this.$refs.CheckboxRadioFilterInput)
|
||||
this.$refs.CheckboxRadioFilterInput.focus();
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
// Cancels previous Request
|
||||
if (this.getOptionsValuesCancel != undefined)
|
||||
this.getOptionsValuesCancel.cancel('Get options request canceled.');
|
||||
|
|
|
@ -411,7 +411,7 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
// Cancels previous Request
|
||||
if (this.getOptionsValuesCancel != undefined)
|
||||
this.getOptionsValuesCancel.cancel('Get options request canceled.');
|
||||
|
|
|
@ -201,7 +201,7 @@ export default {
|
|||
jQuery( document ).on( 'heartbeat-tick', this.onHeartBitTickPopup);
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
if (jQuery && jQuery( document )) {
|
||||
jQuery( document ).off( 'heartbeat-tick', this.onHeartBitTickPopup)
|
||||
}
|
||||
|
|
|
@ -356,7 +356,7 @@
|
|||
})
|
||||
.catch(() => this.isLoadingMetadata = false);
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
// Cancels previous Request
|
||||
if (this.metadataSearchCancel != undefined)
|
||||
this.metadataSearchCancel.cancel('Metadata search Canceled.');
|
||||
|
|
|
@ -391,7 +391,7 @@
|
|||
if (this.isUsingElasticSearch)
|
||||
this.$eventBusSearch.$on('isLoadingItems', this.updateIsLoadingItems);
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
// Cancels previous collection name Request
|
||||
if (this.collectionNameSearchCancel != undefined)
|
||||
this.collectionNameSearchCancel.cancel('Collection name search Canceled.');
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
<script>
|
||||
import { nextTick } from 'vue';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
|
||||
import 'swiper/css';
|
||||
import 'swiper/css/mousewheel';
|
||||
import 'swiper/css/navigation';
|
||||
|
@ -158,7 +158,7 @@
|
|||
});
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
if (typeof this.swiper.destroy == 'function')
|
||||
this.swiper.destroy();
|
||||
},
|
||||
|
|
|
@ -371,7 +371,7 @@ export const dynamicFilterTypeMixin = {
|
|||
}
|
||||
},
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
// Cancels previous Request
|
||||
if (this.getOptionsValuesCancel != undefined)
|
||||
this.getOptionsValuesCancel.cancel('Facet search Canceled.');
|
||||
|
|
|
@ -579,7 +579,7 @@ export default {
|
|||
}
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
// Cancels previous filters Request
|
||||
if (this.filtersSearchCancel != undefined)
|
||||
this.filtersSearchCancel.cancel('Metadata search Canceled.');
|
||||
|
|
|
@ -908,7 +908,7 @@
|
|||
this.hideFiltersOnMobile();
|
||||
window.addEventListener('resize', this.hideFiltersOnMobile);
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
this.removeEventListeners();
|
||||
|
||||
// Cancels previous Metadata Request
|
||||
|
|
|
@ -207,7 +207,7 @@ export default {
|
|||
|
||||
this.fetchCollections();
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
if (typeof this.swiper.destroy == 'function')
|
||||
this.swiper.destroy();
|
||||
},
|
||||
|
|
|
@ -219,7 +219,7 @@ export default {
|
|||
|
||||
this.fetchItems();
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
if (typeof this.swiper.destroy == 'function')
|
||||
this.swiper.destroy();
|
||||
},
|
||||
|
|
|
@ -209,7 +209,7 @@ export default {
|
|||
|
||||
this.fetchTerms();
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
if (typeof this.swiper.destroy == 'function')
|
||||
this.swiper.destroy();
|
||||
},
|
||||
|
|
|
@ -128,7 +128,7 @@ export default {
|
|||
created() {
|
||||
this.shouldUseLegacyMasonyCols = wp !== undefined && wp.hooks !== undefined && wp.hooks.hasFilter('tainacan_use_legacy_masonry_view_mode_cols') && wp.hooks.applyFilters('tainacan_use_legacy_masonry_view_mode_cols', false);
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
if (this.masonry !== false)
|
||||
this.masonry.destroy();
|
||||
},
|
||||
|
|
|
@ -179,7 +179,7 @@ export default {
|
|||
immediate: true
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
if (this.masonry !== false)
|
||||
this.masonry.destroy();
|
||||
},
|
||||
|
|
|
@ -522,7 +522,7 @@ export default {
|
|||
document.documentElement.scrollTo(0,0);
|
||||
document.documentElement.classList.add('is-clipped');
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
// Remove clipped class from root html
|
||||
document.documentElement.classList.remove('is-clipped');
|
||||
|
||||
|
|
|
@ -1010,7 +1010,7 @@
|
|||
this.itemsListBottomIntersectionObserver.observe(this.$refs['items-list-results-bottom']);
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
this.removeEventListeners();
|
||||
|
||||
// Removes intersection listener, if it was set up
|
||||
|
|
|
@ -244,7 +244,7 @@ export default {
|
|||
mounted() {
|
||||
this.$el.addEventListener('tainacan-blocks-facets-list-update', this.receiveSearchString);
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
this.$el.removeEventListener('tainacan-blocks-facets-list-update', this.receiveSearchString);
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -967,7 +967,7 @@ export default {
|
|||
else if (this.hideFileModalButton && this.hideTextModalButton && !this.hideLinkModalButton)
|
||||
this.form.document_type = 'url';
|
||||
},
|
||||
beforeDestroy () {
|
||||
beforeUnmount () {
|
||||
eventBusItemMetadata.$off('hasErrorsOnForm');
|
||||
},
|
||||
methods: {
|
||||
|
|
Loading…
Reference in New Issue