6f647 unable to add a block (#411)
* fix store content bug * fix: form field indexing bug on working form store * fix column width on form fied --------- Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
@@ -248,7 +248,7 @@ export default {
|
|||||||
this.workingFormStore.openAddFieldSidebar(this.field)
|
this.workingFormStore.openAddFieldSidebar(this.field)
|
||||||
},
|
},
|
||||||
getFieldWidthClasses(field) {
|
getFieldWidthClasses(field) {
|
||||||
if (!field.width || field.width === 'full') return 'col-span-full w-full'
|
if (!field.width || field.width === 'full') return 'col-span-full'
|
||||||
else if (field.width === '1/2') {
|
else if (field.width === '1/2') {
|
||||||
return 'w-full sm:col-span-6 col-span-full'
|
return 'w-full sm:col-span-6 col-span-full'
|
||||||
} else if (field.width === '1/3') {
|
} else if (field.width === '1/3') {
|
||||||
|
|||||||
4
client/stores/working_form.js
vendored
4
client/stores/working_form.js
vendored
@@ -129,8 +129,8 @@ export const useWorkingFormStore = defineStore("working_form", {
|
|||||||
}
|
}
|
||||||
newBlock.help_position = "below_input"
|
newBlock.help_position = "below_input"
|
||||||
if (
|
if (
|
||||||
this.selectedFieldIndex === null ||
|
(this.selectedFieldIndex === null || this.selectedFieldIndex === undefined) &&
|
||||||
this.selectedFieldIndex === undefined
|
(index === null || index === undefined)
|
||||||
) {
|
) {
|
||||||
const newFields = clonedeep(this.content.properties)
|
const newFields = clonedeep(this.content.properties)
|
||||||
newFields.push(newBlock)
|
newFields.push(newBlock)
|
||||||
|
|||||||
Reference in New Issue
Block a user