I have a table with built in search and sort functionality as well as pagination. When rows in the table are selected, they do not persist if the user conducts a search or goes to the next page. Is there a way to keep the chosen rows checked even if a search or pagination occurs?
My table HTML is here:
<table id="print_table" class="display table table-striped table-hover table-responsive">
<thead>
<tr>
<th><input type="checkbox" id="selectAll"/></th>
<th>
<a href="javascript:void(0)" ng-click="sortType = 'case_num'; sortReverse = !sortReverse">
${Case Number}
<span ng-show="sortType == 'case_num' && !sortReverse" class="fa fa-caret-down"></span>
<span ng-show="sortType == 'case_num' && sortReverse" class="fa fa-caret-up"></span>
</a>
</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in c.onbCase | orderBy:sortType:sortReverse | filter:searchTable" ng-if="$index >= data.window_start && $index < data.window_end">
<td><input type="checkbox" name="checkbox" ng-click="checkboxFunc(item)"/></td>
<td></td>
</tr>
</tbody>
</table>
Aucun commentaire:
Enregistrer un commentaire