Put folder on top by default (#5918)

This commit is contained in:
Vito
2020-07-28 09:13:04 +01:00
committed by GitHub
parent 76727e954b
commit 01a068550f
2 changed files with 6 additions and 3 deletions

View File

@@ -89,7 +89,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
processId;
@Input()
sorting = ['name', 'asc'];
sorting = ['nodeType', 'DESC'];
@Input()
sortingMode = 'server';

View File

@@ -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();
}