remember builder selected field type

This commit is contained in:
Pete Matsyburka
2024-03-27 13:47:17 +02:00
parent 207780fa3f
commit b570ebee69
5 changed files with 119 additions and 86 deletions
+8 -1
View File
@@ -77,6 +77,11 @@ export default {
required: false,
default: () => []
},
drawFieldType: {
type: String,
required: false,
default: ''
},
allowDraw: {
type: Boolean,
required: false,
@@ -123,7 +128,9 @@ export default {
},
computed: {
defaultFieldType () {
if (this.defaultDrawFieldType && this.defaultDrawFieldType !== 'text') {
if (this.drawFieldType) {
return this.drawFieldType
} else if (this.defaultDrawFieldType && this.defaultDrawFieldType !== 'text') {
return this.defaultDrawFieldType
} else if (this.fieldTypes.length !== 0 && !this.fieldTypes.includes('text')) {
return this.fieldTypes[0]