Add deleteSection

This commit is contained in:
philipp lang 2023-12-27 01:27:47 +01:00
parent 4ddf76943d
commit b26935fc07
1 changed files with 5 additions and 0 deletions

View File

@ -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])"
></event-form>
</ui-box>
</form>
@ -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));
}