From b26935fc070534be1106ade9b7f5551ac0a3ee79 Mon Sep 17 00:00:00 2001 From: philipp lang Date: Wed, 27 Dec 2023 01:27:47 +0100 Subject: [PATCH] Add deleteSection --- resources/js/views/formtemplate/FormBuilder.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/js/views/formtemplate/FormBuilder.vue b/resources/js/views/formtemplate/FormBuilder.vue index 82101d13..f5c8de5b 100644 --- a/resources/js/views/formtemplate/FormBuilder.vue +++ b/resources/js/views/formtemplate/FormBuilder.vue @@ -40,6 +40,7 @@ @addField="addField($event.detail[0])" @editField="editField($event.detail[0], $event.detail[1])" @deleteField="deleteField($event.detail[0], $event.detail[1])" + @deleteSection="deleteSection($event.detail[0])" > @@ -134,6 +135,10 @@ function addField(sectionIndex) { }; } +function deleteSection(sindex) { + inner.value.config.sections.splice(sindex, 1); +} + function setFieldType(field) { singleField.value.model = JSON.parse(JSON.stringify(field.default)); }