✨ Implements move, copy and delete item, and delete section functionality
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
v-click-outside="closeContextMenu"
|
||||
@openEditSection="openEditSection"
|
||||
@navigateToSection="navigateToSection"
|
||||
@removeSection="removeSection"
|
||||
/>
|
||||
</Collapsable>
|
||||
</template>
|
||||
@@ -217,6 +218,12 @@ export default {
|
||||
this.$modal.hide(modalNames.EDIT_SECTION);
|
||||
this.$store.commit(StoreKeys.SET_MODAL_OPEN, false);
|
||||
},
|
||||
/* Deletes current section, in local state */
|
||||
removeSection() {
|
||||
const payload = { sectionIndex: this.index, sectionName: this.title };
|
||||
this.$store.commit(StoreKeys.REMOVE_SECTION, payload);
|
||||
this.closeContextMenu();
|
||||
},
|
||||
/* Open custom context menu, and set position */
|
||||
openContextMenu(e) {
|
||||
this.contextMenuOpen = true;
|
||||
|
||||
Reference in New Issue
Block a user