aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/user_reporting_modal/user_reporting_modal.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/components/user_reporting_modal/user_reporting_modal.js b/src/components/user_reporting_modal/user_reporting_modal.js
index ac5b5192..6b1177b9 100644
--- a/src/components/user_reporting_modal/user_reporting_modal.js
+++ b/src/components/user_reporting_modal/user_reporting_modal.js
@@ -36,15 +36,16 @@ const UserReportingModal = {
}
},
watch: {
- userId (value) {
+ userId: 'resetState'
+ },
+ methods: {
+ resetState () {
// Reset state
this.comment = ''
this.forward = false
this.statusIdsToReport = []
this.processing = false
- }
- },
- methods: {
+ },
closeModal () {
this.$store.dispatch('closeUserReportingModal')
},
@@ -59,6 +60,7 @@ const UserReportingModal = {
this.$store.state.api.backendInteractor.reportUser(params)
.then(() => {
this.processing = false
+ this.resetState()
this.closeModal()
})
},