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:
5
client/stores/working_form.js
vendored
5
client/stores/working_form.js
vendored
@@ -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
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user