How to create a dynamic multi column dropdown list. I am using angular2 and looking for something like this http://alijafarian.com/bootstrap-multi-column-dropdown-menu/
But here we have the columns fixed at 3 and the list items hardcoded.In my case I have a dynamic list and would like to display 5 items in one column.So for Eg: if the list contains 20 items then we would have 4 columns with 5 items each in one column.And my code looks like below
....
<li role="presentation" class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown"
href="#" role="button"
aria-haspopup="true" aria-expanded="false">
Artists
<span class="caret"></span></a>
<ul class="dropdown-menu ">
<li *ngFor="let artist of artists">
<a><input type="checkbox"> {{artist.name}} </a>
</li>
</ul>
</li>
.....
I am using ngFor directive to loop through the list of artists and display it in single column now. But would like to display it in multi column depending on the size of the list.