I am currently in the process of developing an application using Bootstrap and AngularJS. One issue I have encountered involves using ng-repeat within a col-md-3 to list products. The challenge lies in wanting to incorporate a collapse feature into the grid, but due to the automatic generation of columns, I am unsure of how to proceed.
To better illustrate my dilemma, consider the following diagram: Initially, the grid is populated with .col-md-3 elements through ng-repeat.
My goal is to introduce a .col-md-12 that will appear directly below the row corresponding to the clicked .col-md-3 element.
Initially, I thought about dynamically adding an empty .col-md-12 after every set of 4 .col-md-3 elements, but implementing this approach seems challenging. Does anyone have any alternative suggestions?
Here is the relevant html:
<div class="infinite" infinite-scroll="loadDetails()">
<div class="col-xs-3 col-md-3" ng-repeat="release in main.releases | filter:main.album">
<release release="release" artist="main.artist" class="dropdown"></release>
</div>
</div>
EDIT: For those interested, here is a live Plunker demo showcasing tasseKATT's proposed solution.