Open davestewart opened 2 months ago
I've added an app level enhancement to my docs site which ensures only the active sidebar group is open when navigating through the site:
The iles framework has the same functionality.
It's pretty nice when you have long sections that would cause the menu to get overly-long and start scrolling.
If you click a sidebar group header, or navigate to a page, the active sidebar group would open, and the others would close.
If you click a sidebar group toggle, the group would open / close, without affecting other groups.
The developer would opt-in to this functionality in themeConfig.sidebar.
themeConfig.sidebar
I've used enhanceApp(), a router handler, and some custom code to achieve this on my own site.
enhanceApp()
Happy to look at PRing this.
It seems that the sidebar composable is the place to start digging around.
sidebar
Is your feature request related to a problem? Please describe.
I've added an app level enhancement to my docs site which ensures only the active sidebar group is open when navigating through the site:
The iles framework has the same functionality.
It's pretty nice when you have long sections that would cause the menu to get overly-long and start scrolling.
Describe the solution you'd like
If you click a sidebar group header, or navigate to a page, the active sidebar group would open, and the others would close.
If you click a sidebar group toggle, the group would open / close, without affecting other groups.
The developer would opt-in to this functionality in
themeConfig.sidebar
.Describe alternatives you've considered
I've used
enhanceApp()
, a router handler, and some custom code to achieve this on my own site.Additional context
Happy to look at PRing this.
It seems that the
sidebar
composable is the place to start digging around.Validations