From d013bd9de13c253411dc9a731c57aff5a1790220 Mon Sep 17 00:00:00 2001 From: ogerly Date: Wed, 30 Mar 2022 08:00:30 +0200 Subject: [PATCH 1/2] set function onReset on created components for clear form --- frontend/src/components/GddSend/TransactionForm.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/GddSend/TransactionForm.vue b/frontend/src/components/GddSend/TransactionForm.vue index 5e683d132..cb625da42 100644 --- a/frontend/src/components/GddSend/TransactionForm.vue +++ b/frontend/src/components/GddSend/TransactionForm.vue @@ -184,8 +184,7 @@ export default { memo: this.form.memo, }) }, - onReset(event) { - event.preventDefault() + onReset() { this.form.email = '' this.form.amount = '' this.form.memo = '' @@ -213,6 +212,7 @@ export default { }, }, created() { + this.onReset() this.form.email = this.recipientEmail ? this.recipientEmail : '' }, } From 40c7f96b20d9f786171fd7f0e715a7ae739c308b Mon Sep 17 00:00:00 2001 From: ogerly Date: Wed, 30 Mar 2022 08:07:32 +0200 Subject: [PATCH 2/2] remove onReset in created, add EMPTY_TRANSACTION_DATA in send function --- frontend/src/components/GddSend/TransactionForm.vue | 4 ++-- frontend/src/pages/Send.vue | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/GddSend/TransactionForm.vue b/frontend/src/components/GddSend/TransactionForm.vue index cb625da42..5e683d132 100644 --- a/frontend/src/components/GddSend/TransactionForm.vue +++ b/frontend/src/components/GddSend/TransactionForm.vue @@ -184,7 +184,8 @@ export default { memo: this.form.memo, }) }, - onReset() { + onReset(event) { + event.preventDefault() this.form.email = '' this.form.amount = '' this.form.memo = '' @@ -212,7 +213,6 @@ export default { }, }, created() { - this.onReset() this.form.email = this.recipientEmail ? this.recipientEmail : '' }, } diff --git a/frontend/src/pages/Send.vue b/frontend/src/pages/Send.vue index f4c5095eb..270187bec 100644 --- a/frontend/src/pages/Send.vue +++ b/frontend/src/pages/Send.vue @@ -148,6 +148,7 @@ export default { .then((result) => { this.$emit('set-tunneled-email', null) this.code = result.data.createTransactionLink.code + this.transactionData = { ...EMPTY_TRANSACTION_DATA } this.currentTransactionStep = TRANSACTION_STEPS.transactionResultLink this.updateTransactions({}) })