Reputation: 287
I have a React web with two equal menus, so I've made a component with the menu and I render it twice in App component.
For the menu I use Material UI Accordion but when I click on the menu details, the menu colapses by defaul. How can I prevent that?
Here is an example code: codeSandBox
I don't care about the functionality of the example, I only want to be able to click on menu details without closing it and execute onClick function.
Upvotes: 0
Views: 3022
Reputation: 362
I'm also starting with React but I removed the code onClick = {() => handleClick (option)} and the menu is working, I'll try to check something else to help you.
Upvotes: 0