fix: add section below

This commit is contained in:
Shariq Ansari 2023-11-27 15:21:13 +05:30
parent 0d72a7964a
commit 7602174871

View file

@ -101,9 +101,9 @@ const selected = computed(() => store.selected(props.section.df.name));
const column = computed(() => props.section.columns[props.section.columns.length - 1]);
// section
function add_section_above() {
function add_section_below() {
let index = props.tab.sections.indexOf(props.section);
props.tab.sections.splice(index, 0, section_boilerplate());
props.tab.sections.splice(index + 1, 0, section_boilerplate());
}
function is_section_empty() {
@ -262,7 +262,7 @@ const options = computed(() => {
{
group: "Section",
items: [
{ label: "Add section above", onClick: add_section_above },
{ label: "Add section below", onClick: add_section_below },
{ label: "Remove section", onClick: remove_section },
],
},