AngularJS Datatables sort on checked items
I am using anguarljs Lin Datatables Lin Datatables
The datatables work nice and search,sort works great, but there is a requirement to sort the datatable's on checked items.
For example , when user checks the checkbox and wants to sort on basis of checked items the sorting functionality doesn't work.
Can anyone please suggest how to sort using Lin datatables on basis of check-boxes.
The html code for checking the check-box state is
<td><input id="{{content.fileName}}" type="checkbox"
value="{{content.fileName}}" ng-model="content.isChecked"
ng-click="toggleSelection(content)" /></td>
Answers 1
You should implement the small
dom-checkbox
plugin. It works with angular dataTables as well :Then set the
#
column to usedom-checkbox
asorderDataType
:have replicated your scenario here -> http://plnkr.co/edit/kXFzUmcjikUOQliqn02Z?p=preview