Beautiful Open-Source Form Builder
fix store content bug (#410)
Favour Olayinka12e5546ff3c8
diff --git a/client/stores/working_form.js b/client/stores/working_form.jsindex eab5c4d60..0ff671ddd 100644--- a/client/stores/working_form.js+++ b/client/stores/working_form.js@@ -105,6 +105,7 @@ export const useWorkingFormStore = defineStore("working_form", {},addBlock(type, index = null) {+ this.selectedFieldIndex = indexthis.blockForm.type = typethis.blockForm.name = defaultBlockNames[type]const newBlock = this.prefillDefault(this.blockForm.data())@@ -135,7 +136,7 @@ export const useWorkingFormStore = defineStore("working_form", {newFields.push(newBlock)this.content.properties = newFieldsthis.openSettingsForField(- this.form.properties.length - 1,+ this.content.properties.length - 1,)} else {const fieldIndex = typeof index === "number" ? index : this.selectedFieldIndex + 1