mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-4205] reload on sorting only for server mode (#6420)
* reload on sorting only for server mode * cleanup demo shell / files
This commit is contained in:
@@ -201,7 +201,7 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
|
||||
* before delivering it.
|
||||
*/
|
||||
@Input()
|
||||
sortingMode = 'server';
|
||||
sortingMode: 'server' | 'client' = 'server';
|
||||
|
||||
/** The inline style to apply to every row. See
|
||||
* the Angular NgStyle
|
||||
@@ -707,8 +707,11 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
|
||||
|
||||
onSortingChanged(event: CustomEvent) {
|
||||
this.orderBy = this.buildOrderByArray(event.detail.sortingKey, event.detail.direction);
|
||||
this.reload();
|
||||
this.sortingSubject.next([this.additionalSorting, event.detail]);
|
||||
|
||||
if (this.sortingMode === 'server') {
|
||||
this.reload();
|
||||
}
|
||||
}
|
||||
|
||||
private buildOrderByArray(currentKey: string, currentDirection: string): string[] {
|
||||
|
Reference in New Issue
Block a user