Skip to content

Commit c5922ca

Browse files
committed
fix: CSidebarNavDropdown: fix default mode for nested dropdowns
1 parent 3165af9 commit c5922ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/template/CSidebarNavDropdown.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ const CSidebarNavDropdown = props => {
5757
}, [openDropdown])
5858

5959
const toggle = () => {
60-
!dropdownMode && setOpenDropdown(isOpen ? null : ref.current)
60+
!dropdownMode && setOpenDropdown(
61+
isOpen ? ref.current.parentNode.closest('.c-sidebar-nav-dropdown') : ref.current
62+
)
6163
setIsOpen(!isOpen)
6264
}
6365

0 commit comments

Comments
 (0)