From c447c45ea241fbd5f469e10eb3a90634ea9928ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C5=BEe=20Fortun?= Date: Mon, 18 Sep 2023 16:06:24 +0200 Subject: [PATCH] Adjust sidebar nav items collapse button style --- .../src/components/navigation/CSidebarNavItems.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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