fix field width offset (#417)

* fix store content bug

* fix: form field indexing bug on working form store

* fix column width on  form fied

* fix field width offset

* UI polishing

* Fix cursor grab

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
Favour Olayinka
2024-05-22 13:36:42 +01:00
committed by GitHub
parent 292e32959b
commit 8760925007
4 changed files with 23 additions and 50 deletions

View File

@@ -105,7 +105,6 @@ 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())
@@ -149,8 +148,8 @@ export const useWorkingFormStore = defineStore("working_form", {
moveField(oldIndex, newIndex) {
const newFields = clonedeep(this.content.properties)
const field = newFields.splice(oldIndex, 1)[0];
newFields.splice(newIndex, 0, field);
const field = newFields.splice(oldIndex, 1)[0]
newFields.splice(newIndex, 0, field)
this.content.properties = newFields
}
},