And where is the code for opening it? I see you stop the browser event but you do nothing after that
Inertia & ReactJS toggle dropdown menu works only once
Am using e.stopPropagtion() to prevent Inertia form following a link of sidebar toggle menu. The menu opens first time I click on the link for example component, the components is loaded as expected. The problem is that the menu closes after the component is loaded and I can't open the it again. See code snippet below:
<div className="sidebar-menu">
<ul id="accordion-menu">
<li className="dropdown">
<Link className="dropdown-toggle no-arrow" href="/"><span className="fa fa-home"></span><span className="mtext">Home</span></Link>
</li>
<li className="dropdown">
<a href="#" onClick={e => e.nativeEvent.stopPropagation()} className="dropdown-toggle">
<span className="fa fa-table"></span><span className="mtext">Menu</span>
</a>
<ul className="submenu">
<li><Link href="/example">Example</Link></li>
<li><a href="#">Menu Item 1</a></li>
<li><a href="#">Menu Item 2</a></li>
</ul>
</li>
</ul>
</div>
Sidenote: Am using DeskApp admin template
@kenprogrammer I would rip out the html and drop the jquery. Or just use the template with pure jquery as it was intended
I have never tried getting jquery together with react, but I would image it would lead to alot of ideas and they will fight over which of them controls the dom
Please or to participate in this conversation.