From 95893f8cfbf50a22d5e3d678e06bc584ab7c5699 Mon Sep 17 00:00:00 2001
From: 135e2 <135e2@135e2.tk>
Date: Tue, 9 Aug 2022 01:09:46 +0800
Subject: refactor(EditPage): make form behavior consistent

---
 src/components/EditPage.vue | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'src/components/EditPage.vue')

diff --git a/src/components/EditPage.vue b/src/components/EditPage.vue
index 71d1e6b..21d9ea9 100644
--- a/src/components/EditPage.vue
+++ b/src/components/EditPage.vue
@@ -78,7 +78,7 @@
       </v-btn>
 
       <v-btn variant="outlined" class="mr-4" @click="reset(this.$refs.form2)">
-        Reset Validation
+        Reset Form
       </v-btn>
       <v-btn variant="outlined" class="mr-4" @click="deleteItem">
         Delete Item
@@ -126,9 +126,9 @@ export default {
       form.validate();
     },
     reset(form) {
-      // Resets validation of all registered inputs without modifying their state.
-      // TODO: clearify this (do we need form.reset() ?)
-      form.resetValidation();
+      // Resets the state of all registered inputs (inside the form) to {} for arrays and null for all other values.
+      // Resets errors bag when using the lazy-validation prop.
+      form.reset();
     },
     write(form) {
       if (form == this.$refs.form1 && this.title in this.LSData) {
-- 
cgit v1.2.3

