Having some trouble with my vertical Nav created using bootstrap 4. I have 2 levels of lists, but when I click on one dropdown, the other dropdown doesn't close.
Here is a link to the issue: https://jsfiddle.net/thilanka/cr0Lfmd1
<ul class="nav flex-column flex-nowrap">
<li class="nav-item drop">
<a class="nav-link collapsed" href="#submenu1" data-toggle="collapse" > sub menu 1</a>
<div class="collapse" id="submenu1" aria-expanded="false">
<ul class="flex-column pl-2 nav">
<li class="nav-item">
<a class="nav-link collapsed py-1" href="#submenu1sub1" data-toggle="collapse" >sub 11</a>
<div class="collapse" id="submenu1sub1" aria-expanded="false">
<ul class="flex-column nav pl-4">
<li class="nav-item">
<a class="nav-link p-1" href="#">
<i class="fa fa-fw fa-clock-o"></i> Daily
</a>
</li>
</ul>
</div>
</li>
</ul>
</div>
</li>
<li class="nav-item drop">
<a class="nav-link collapsed" href="#submenu4" data-toggle="collapse" >sub menu 2</a>
<div class="collapse" id="submenu4" aria-expanded="false">
<ul class="flex-column pl-2 nav">
<li class="nav-item">
<a class="nav-link collapsed py-1" href="#submenu1sub3" data-toggle="collapse" >sub 22</a>
<div class="collapse" id="submenu1sub3" aria-expanded="false">
<ul class="flex-column nav pl-4">
<li class="nav-item">
<a class="nav-link p-1" href="#">
<i class="fa fa-fw fa-clock-o"></i> Daily
</a>
</li>
<li class="nav-item">
<a class="nav-link p-1" href="#">
<i class="fa fa-fw fa-dashboard"></i> Dashboard
</a>
</li>
</div>
</li>
</ul>
</div>
</li>
</ul>
I'm looking to create a bootstrap 4 sidebar with 2 levels of menu.