diff --git a/lib/vue/src/components/navigation/CSidebarNavItems.vue b/lib/vue/src/components/navigation/CSidebarNavItems.vue index 4ee658268..8faf613f9 100644 --- a/lib/vue/src/components/navigation/CSidebarNavItems.vue +++ b/lib/vue/src/components/navigation/CSidebarNavItems.vue @@ -41,9 +41,9 @@ v-if="children.length" > { + items.forEach(({ page, params, children }) => { const px = this.pageIndex(page) // Apply startExpanded only if page isn't currently expanded - this.$set(this.collapses, px, this.startExpanded || page.expanded) + this.$set(this.collapses, px, this.startExpanded || page.expanded || this.showChildren({ params, children })) }) }, }, @@ -136,7 +136,7 @@ export default { this.$set(this.collapses, px, !this.collapses[px]) }, - // Recursively check for child pages that are open, so that parents can open aswell + // Recursively check for child pages that are open, so that parents can open as well showChildren ({ params = {}, children = [] }) { const partialParamsMatch = Object.entries(params).some(([key, value]) => { return this.$route.params[key] === value