collapse/expand all rows
I added a button for collapse/expand all rows when group.
- I use aggregateTemplate
<div ng-click="row.toggleExpand()" ng-style="rowStyle(row)" class="ngAggregate"> <span class="ngAggregateText"> {{row.label CUSTOM_FILTERS}} ({{row.totalChildren()}} {{AggItemsLabel}}) </span> <input type="hidden" ng-value="toggle(row)"> <div class="{{row.aggClass()}}"></div> </div> - for collapsed:
toggle(row) -> row.setExpand(true) - for expand:
toggle(row) -> row.setExpand(false) - But I get the error
[$rootScope:infdig] 10 $digest() iterations reached. Aborting!
How can I handle this error?
I have the same question to ask. Tried to modify the library directly but failed.
I have the same problem. I want add a button to collapse or expand all, is it possible?
you can try to get access to all aggCache in rowFactory using $scope.GridOptions.ngGrid.rowFactory.aggCache and for every row in aggCache you call toggleExpand() function.
For example.
$scope.expandAllRows = function(){ angular.forEach($scope.GridOptions.ngGrid.rowFactory.aggCache,function(row){ row.toggleExpand(); }); } here is the plunker http://plnkr.co/edit/eK9GtkC3DvpubxS7lj7b?p=preview
From looking at the stackOverflow question, it appears that you've identified a solution. Is that correct, and can this be closed?
More information requested on a relatively old issue, and no further comment for 2 weeks, assuming that issued is resolved.