How to make double nested Menus in the sidebar? #2303
Unanswered
firstake-online
asked this question in
Q&A
Replies: 1 comment
-
So I figured out that the issue was happening due to "data-bs-target" being set to "#headerMenuCollapse" as default to all nested dropdown menus. So when I try to open the inner menu, since its parent is same as outer menu it was toggling the state of the outer menu too. Fixed the issue by adding a parent attribute in the Menu class and setting it explicitly while creating the sub-menu. Menu::make(__('Out Menu'))
->slug('out-menu')
->list([
Menu::make(__('Test'))
->slug('in-menu')
->parent('out-menu')
->list([
Menu::make(__('Test 1'))
->slug('in-menu1')
->icon('drawer'),
]),
Menu::make(__('Test Haha'))
->slug('in-menu2')
->parent('out-menu')
->list([
Menu::make(__('Test 67'))
->slug('in-menu1')
->icon('drawer'),
]),
Menu::make(__('Test 2'))
->icon('user'),
Menu::make(__('Test 3'))
->icon('user'),
Menu::make(__('Haha 3'))
->icon('user'),
Menu::make(__('Uhu2'))
->icon('user'),
])
->icon('user') I have added the same changes to a pull request : #2304 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I tried making a double nested side menu using the following code-
But it behaviour is not as expected. When I open the "Out Menu" and then try to open the Inner menu "Test" then the outer menu closes along with inner menu opening.
Any ideas to fix this issue?
Screen.Recording.2022-07-10.at.12.07.45.AM.mov
Beta Was this translation helpful? Give feedback.
All reactions