mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
#66 fix clickable header behaviour for special cases
This commit is contained in:
@@ -332,7 +332,7 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit
|
||||
}
|
||||
|
||||
onColumnHeaderClick(column: ContentColumnModel) {
|
||||
if (column) {
|
||||
if (column && this._isSortableColumn(column)) {
|
||||
if (this.sorting.key === column.source) {
|
||||
this.sorting.direction = this.sorting.direction === 'asc' ? 'desc' : 'asc';
|
||||
} else {
|
||||
@@ -368,4 +368,8 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit
|
||||
private _hasEntries(node: NodePaging): boolean {
|
||||
return (node && node.list && node.list.entries && node.list.entries.length > 0);
|
||||
}
|
||||
|
||||
private _isSortableColumn(column: ContentColumnModel) {
|
||||
return column && column.source && !column.source.startsWith('$');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user