Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (20 sloc) 786 Bytes
import {Component, Input, Output, EventEmitter} from '@angular/core'
@Component({
selector: '.sortable-column-header',
template: `
<div (click)="onHeaderClicked($event)" style="cursor: pointer;">
<span *ngIf="sortIndicator < 0"><i class="fa fa-sort-desc"></i></span>
<span *ngIf="sortIndicator > 0"><i class="fa fa-sort-asc"></i></span>
<span *ngIf="sortIndicator === 0"><i class="fa fa-sort"></i></span>
<ng-content></ng-content>
</div>
`
})
export class SortableColumnHeader {
@Input() public sortIndicator: number;
@Output() public toggleSort: EventEmitter<any> = new EventEmitter();
public onHeaderClicked(event) {
event.preventDefault();
this.toggleSort.emit(null);
}
}
You can’t perform that action at this time.