mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Put folder on top by default (#5918)
This commit is contained in:
@@ -89,7 +89,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
processId;
|
||||
|
||||
@Input()
|
||||
sorting = ['name', 'asc'];
|
||||
sorting = ['nodeType', 'DESC'];
|
||||
|
||||
@Input()
|
||||
sortingMode = 'server';
|
||||
|
@@ -182,7 +182,7 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
|
||||
* override the default sorting detected by the component based on columns.
|
||||
*/
|
||||
@Input()
|
||||
sorting = ['name', 'asc'];
|
||||
sorting = ['nodeType', 'DESC'];
|
||||
|
||||
/** Defines sorting mode. Can be either `client` (items in the list
|
||||
* are sorted client-side) or `server` (the ordering supplied by the
|
||||
@@ -671,7 +671,10 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
|
||||
}
|
||||
|
||||
onSortingChanged(event: CustomEvent) {
|
||||
this.orderBy = [''.concat(event.detail.key, ' ' , event.detail.direction)];
|
||||
const flattenExtraSortingOption = this.sorting.join(' ');
|
||||
const orderArray = [flattenExtraSortingOption];
|
||||
orderArray.push(''.concat(event.detail.key, ' ', event.detail.direction));
|
||||
this.orderBy = orderArray;
|
||||
this.reload();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user