#66 Initial sorting support for document list

This commit is contained in:
Denys Vuika
2016-05-17 15:57:13 +01:00
parent 5a4bfb5ea8
commit a0848ea825
7 changed files with 85 additions and 9 deletions

View File

@@ -8,7 +8,11 @@
<thead>
<tr>
<!-- Columns -->
<th class="mdl-data-table__cell--non-numeric {{col.cssClass}}" *ngFor="#col of columns">
<th class="mdl-data-table__cell--non-numeric column-header {{col.cssClass}}"
*ngFor="#col of columns"
[class.mdl-data-table__header--sorted-ascending]="sorting.key === col.source && sorting.direction === 'asc'"
[class.mdl-data-table__header--sorted-descending]="sorting.key === col.source && sorting.direction === 'desc'"
(click)="onColumnHeaderClick(col)">
<span *ngIf="col.srTitle" class="sr-only">{{col.srTitle}}</span>
<span *ngIf="col.title">{{col.title}}</span>
</th>