coreui-free-angular-admin-template icon indicating copy to clipboard operation
coreui-free-angular-admin-template copied to clipboard

Side menu items isn't closed accordingly

Open ahmedsamirbek opened this issue 2 years ago • 3 comments

I have issue here I need when open menu group item others collapsed

ahmedsamirbek avatar May 17 '22 14:05 ahmedsamirbek

@ahmedsamirbek do you need to keep open other menu groups or to close them?

xidedix avatar May 18 '22 14:05 xidedix

@xidedix I need , when open one other closed

ahmedsamirbek avatar May 18 '22 14:05 ahmedsamirbek

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions

github-actions[bot] avatar Aug 10 '22 23:08 github-actions[bot]

Any solution @xidedix? I see that the vue version (https://coreui.io/vue/docs/3.2/components/sidebar.html) has the prop dropdownMode with value closeInactive. "closeInactive - closes every inactive dropdown on route change, opens dropdown when route state is active".

pabloinforio avatar Nov 09 '22 14:11 pabloinforio

@pabloinforio CoreUI 4 for Angular - closeInactive prop of SidaberNav is the default value of dropdownMode. It opens SidebarNavGroup - when the active route matches url for a navItem with children (navItems: INavData[]) It closes every SidebarNavGroup on route change - when the active route does not match url for a navItem with children

xidedix avatar Nov 09 '22 17:11 xidedix

@xidedix So there's no way to close one group when click in other group? I'm asking because I notice this behavior in vue (https://coreui.io/demos/vue/4.0/free/#/dashboard) and bootstrap (https://coreui.io/demos/bootstrap/4.3/default-v3/) example.

pabloinforio avatar Nov 09 '22 17:11 pabloinforio

@pabloinforio Thanks for the clarification. We'll try to fix the issue in an upcoming patch later next week.

xidedix avatar Nov 10 '22 11:11 xidedix

@pabloinforio fixed in @coreui/[email protected]

dropdownMode prop accepts one of the following:

  • path: close inactive sidebar-nav-group on active route change only (default - backward compatible)
  • close: close open sidebar-nav-group on other group click
  • none: keep sidebar-nav-group open
<c-sidebar-nav 
  [navItems]="navItems"
  dropdownMode="close"
></c-sidebar-nav>

xidedix avatar Nov 18 '22 20:11 xidedix