Is there a way to create custom sorting for a column containing non-textual data?
Here is a snapshot:
I would like to sort by the icon symbol.
P.S. The both icons are shown using ng-if
and a boolean value from the dataset.
Edit: I'am using the Angular way of displaying data.
<table datatable="ng" dt-options="dtOptionsLoginHistory" dt-column-defs="dtColumnDefsLoginHistory"
class="table table-striped row-border hover"
width="100%">
<thead>
<tr>
<th>Success</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="entry in entries">
<td style="width: 10%;">
<i ng-if="!entry.failed" class="fa fa-check" style="color: green;"></i>
<i ng-if="entry.failed" class="fa fa-times" style="color: red;"></i>
</td>
</tr>
</tbody>
</table>