Auto expand

This commit is contained in:
Douglas Barone 2022-04-07 09:40:18 -04:00
parent 078668680b
commit 90d5b9c01a

View File

@ -8,7 +8,10 @@
nav
>
<template v-if="group.groupTitle && !mini">
<v-list-group :prepend-icon="group.groupIcon" :value="false">
<v-list-group
:prepend-icon="group.groupIcon"
:value="shouldShowGroup(group)"
>
<template #activator>
<v-list-item-title>
<v-list-item-title>{{ group.groupTitle }}</v-list-item-title>
@ -57,6 +60,13 @@ import Nav from '@/mixins/Nav'
export default {
name: 'NavList',
mixins: [Nav],
methods: {
shouldShowGroup({ items }) {
return items.some(item =>
this.$route.matched.some(route => route.name === item.route.name)
)
}
},
props: {
mini: {
type: Boolean,