esvit / ng-table

Simple table with sorting and filtering on AngularJS
http://esvit.github.io/ng-table
BSD 3-Clause "New" or "Revised" License
2.77k stars 851 forks source link

Duplicate sorting icons with custom template #821

Open mattes42 opened 8 years ago

mattes42 commented 8 years ago

When I use a custom template, the sorting icons are added twice. See code and screenshot. Note: I've omitted the second column in the code. Duplicate Icons:

duplicateicons

Code:

<table ng-table="tableParams" class="table table-striped">
  <tr ng-repeat="c in data">
     <td header="'a.html'" sortable="'attr1'">{{c.attr1}}</td>
  </tr>
</table>

<script type="text/ng-template" id="a.html">
    <span style="color:#0073ff">&Sigma;</span>
</script>
Grom-S commented 8 years ago

Had the same problem. Add this to your styles for a quick and dirty fix:

.ng-table th.sortable div div:after,
.ng-table th.sortable div div:before,
.ng-table th.sortable.sort-desc div div:after {
    border-width: 0;
}

.ng-table th.sortable div div {
    padding-right: 0;
}