fix store content bug (#410)
This commit is contained in:
3
client/stores/working_form.js
vendored
3
client/stores/working_form.js
vendored
@@ -105,6 +105,7 @@ export const useWorkingFormStore = defineStore("working_form", {
|
||||
},
|
||||
|
||||
addBlock(type, index = null) {
|
||||
this.selectedFieldIndex = index
|
||||
this.blockForm.type = type
|
||||
this.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 = newFields
|
||||
this.openSettingsForField(
|
||||
this.form.properties.length - 1,
|
||||
this.content.properties.length - 1,
|
||||
)
|
||||
} else {
|
||||
const fieldIndex = typeof index === "number" ? index : this.selectedFieldIndex + 1
|
||||
|
||||
Reference in New Issue
Block a user