code optimize

code optimize
This commit is contained in:
hiteshkumar87 2024-01-04 15:11:25 +05:30
parent e08e73bbc5
commit 094451ef5d
3 changed files with 4 additions and 8 deletions

View file

@ -89,7 +89,7 @@ export default {
document.getElementById(this.modalId)?.focus(); document.getElementById(this.modalId)?.focus();
}, },
resetButtonStyle() { resetButtonStyle() {
this.$refs.modalButtonMain.resetButtonStyle(); this.$refs.modalButtonMain?.resetButtonStyle();
}, },
onModalOpened() { onModalOpened() {
this.onModalOpenedCallback?.(); this.onModalOpenedCallback?.();

View file

@ -498,13 +498,6 @@ export default {
this.updateFooterButtonText(newValue); this.updateFooterButtonText(newValue);
}, },
}, },
unmounted() {
// remove modal backdrop if one exists
let modalBackground = document.querySelector(".modal-backdrop");
if (modalBackground) {
modalBackground.remove();
}
},
components: { components: {
funnelHeader, funnelHeader,
navbar, navbar,

View file

@ -494,6 +494,9 @@ export default {
}; };
}, },
}, },
unmounted() {
if (this.isModalOpened) this.closeModal();
},
watch: { watch: {
modelValue: { modelValue: {
handler(newValue) { handler(newValue) {