From 8287c5dc119bb8a5dca400f70f747919bb82be12 Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Mon, 27 Nov 2023 14:59:01 +0530 Subject: [PATCH] Reset form on modal closed Reset form on modal closed --- .../promo-modal-question/promo-modal-question.spec.js | 1 + .../payment-method/promo-modal-question/promo-modal-question.vue | 1 + 2 files changed, 2 insertions(+) diff --git a/src/layouts/payment-method/promo-modal-question/promo-modal-question.spec.js b/src/layouts/payment-method/promo-modal-question/promo-modal-question.spec.js index 110ece01e..16d170e82 100644 --- a/src/layouts/payment-method/promo-modal-question/promo-modal-question.spec.js +++ b/src/layouts/payment-method/promo-modal-question/promo-modal-question.spec.js @@ -11,6 +11,7 @@ jest.mock("@/digital-components/modal/modal", () => ({ methods: { closeModal: jest.fn(), resetButtonStyle: jest.fn(), + resetForm: jest.fn(), }, })); diff --git a/src/layouts/payment-method/promo-modal-question/promo-modal-question.vue b/src/layouts/payment-method/promo-modal-question/promo-modal-question.vue index 04d2162da..120e88292 100644 --- a/src/layouts/payment-method/promo-modal-question/promo-modal-question.vue +++ b/src/layouts/payment-method/promo-modal-question/promo-modal-question.vue @@ -169,6 +169,7 @@ export default { this.resetAlerts(); this.$emit("update:modelValue", this.lineItems); this.promoCode = ""; + this.modal.resetForm(); }, focusOnPromoInput() { const input = document.getElementById(this.promoTextInputId);