mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
Fixed sorting for filters (#1597)
Co-authored-by: Vito Albano <vitoalbano@Vitos-MacBook-Pro.local>
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
[imageResolver]="imageResolver"
|
||||
(node-dblclick)="navigateTo($event.detail?.node)"
|
||||
(name-click)="navigateTo($event.detail?.node)"
|
||||
(sorting-changed)="onSortingChanged($event)"
|
||||
>
|
||||
<adf-custom-header-filter-template>
|
||||
<ng-template let-col>
|
||||
@@ -39,6 +40,7 @@
|
||||
[currentFolderNodeId]="node?.id"
|
||||
[maxItems]="(documentList?.pagination | async)?.maxItems"
|
||||
[skipCount]="(documentList?.pagination | async)?.skipCount"
|
||||
[sorting]="filterSorting"
|
||||
(update)="onFilterUpdate($event)"
|
||||
(clear)="onAllFilterCleared()"
|
||||
>
|
||||
|
@@ -66,6 +66,7 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges {
|
||||
canUpload = false;
|
||||
nodeResult: NodePaging;
|
||||
showHeader = ShowHeaderMode.Always;
|
||||
filterSorting = null;
|
||||
|
||||
protected subscriptions: Subscription[] = [];
|
||||
|
||||
@@ -164,6 +165,10 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges {
|
||||
this.nodeResult = newNodePaging;
|
||||
}
|
||||
|
||||
onSortingChanged(event) {
|
||||
this.filterSorting = event.detail.key + '-' + event.detail.direction;
|
||||
}
|
||||
|
||||
onAllFilterCleared() {
|
||||
if (!this.isOutletPreviewUrl()) {
|
||||
this.documentList.node = null;
|
||||
|
Reference in New Issue
Block a user