From 9a01ae5e1102603369c985cad2c07b5326ad8a37 Mon Sep 17 00:00:00 2001 From: Jonathan Reinink Date: Tue, 22 Dec 2020 16:40:13 -0500 Subject: [PATCH] Fix edit user form resetting --- resources/js/Pages/Users/Edit.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/resources/js/Pages/Users/Edit.vue b/resources/js/Pages/Users/Edit.vue index 7c0b2e0..10a16a3 100644 --- a/resources/js/Pages/Users/Edit.vue +++ b/resources/js/Pages/Users/Edit.vue @@ -12,7 +12,7 @@ This user has been deleted.
-
+
@@ -66,13 +66,18 @@ export default { first_name: this.user.first_name, last_name: this.user.last_name, email: this.user.email, - password: this.user.password, + password: null, owner: this.user.owner, photo: null, }), } }, methods: { + submit() { + this.form.post(this.route('users.update', this.user.id), { + onSuccess: () => this.form.reset('password', 'photo'), + }) + }, destroy() { if (confirm('Are you sure you want to delete this user?')) { this.$inertia.delete(this.route('users.destroy', this.user.id))