diff --git a/src/components/NcAppNavigationItem/NcAppNavigationItem.vue b/src/components/NcAppNavigationItem/NcAppNavigationItem.vue
index d2dd9fce92..731fa96fe3 100644
--- a/src/components/NcAppNavigationItem/NcAppNavigationItem.vue
+++ b/src/components/NcAppNavigationItem/NcAppNavigationItem.vue
@@ -256,7 +256,7 @@ Just set the `pinned` prop.
:class="{
'app-navigation-entry--opened': opened,
'app-navigation-entry--pinned': pinned,
- 'app-navigation-entry--collapsible': collapsible,
+ 'app-navigation-entry--collapsible': isCollapsible(),
}"
class="app-navigation-entry-wrapper">
-
+
-
+
@@ -614,13 +614,11 @@ export default {
editingValue: '',
opened: this.open, // Collapsible state
editingActive: false,
- hasChildren: false,
/**
* Tracks the open state of the actions menu
*/
menuOpenLocalValue: false,
focused: false,
- collapsible: false,
actionsBoundariesElement: undefined,
}
},
@@ -666,14 +664,6 @@ export default {
this.actionsBoundariesElement = document.querySelector('#content-vue') || undefined
},
- created() {
- this.updateSlotInfo()
- },
-
- beforeUpdate() {
- this.updateSlotInfo()
- },
-
methods: {
// sync opened menu state with prop
onMenuToggle(state) {
@@ -730,9 +720,13 @@ export default {
this.$emit('undo')
},
- updateSlotInfo() {
- this.hasChildren = !!this.$scopedSlots.default
- this.collapsible = this.allowCollapse && !!this.$scopedSlots.default
+ /**
+ * Does this item have children and is collapsing allowed via the prop?
+ *
+ * @return {boolean} True, if the item can be collapsed
+ */
+ isCollapsible() {
+ return this.allowCollapse && !!this.$scopedSlots.default
},
/**