fix checkbox add on missclick

pull/289/head 1.5.5
Pete Matsyburka 2 years ago
parent a0f4916d3b
commit 6d93116993

@ -857,7 +857,7 @@ export default {
type = this.fieldTypes[0] type = this.fieldTypes[0]
} }
if (type === 'checkbox' && !this.drawFieldType) { if (type === 'checkbox' && !this.drawFieldType && (this.template.fields[this.template.fields.length - 1]?.type === 'checkbox' || area.w)) {
const previousField = [...this.template.fields].reverse().find((f) => f.type === type) const previousField = [...this.template.fields].reverse().find((f) => f.type === type)
const previousArea = previousField?.areas?.[previousField.areas.length - 1] const previousArea = previousField?.areas?.[previousField.areas.length - 1]

Loading…
Cancel
Save