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:
@@ -514,6 +514,20 @@
|
|||||||
"field": "cm:created",
|
"field": "cm:created",
|
||||||
"ascending": true
|
"ascending": true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"key": "modifiedAt",
|
||||||
|
"label": "SEARCH.SORT.MODIFIED_DATE",
|
||||||
|
"type": "FIELD",
|
||||||
|
"field": "cm:modified",
|
||||||
|
"ascending": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "modifiedByUser.displayName",
|
||||||
|
"label": "SEARCH.SORT.MODIFIER",
|
||||||
|
"type": "FIELD",
|
||||||
|
"field": "cm:modifier",
|
||||||
|
"ascending": true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"key": "score",
|
"key": "score",
|
||||||
"label": "Relevance",
|
"label": "Relevance",
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
[imageResolver]="imageResolver"
|
[imageResolver]="imageResolver"
|
||||||
(node-dblclick)="navigateTo($event.detail?.node)"
|
(node-dblclick)="navigateTo($event.detail?.node)"
|
||||||
(name-click)="navigateTo($event.detail?.node)"
|
(name-click)="navigateTo($event.detail?.node)"
|
||||||
|
(sorting-changed)="onSortingChanged($event)"
|
||||||
>
|
>
|
||||||
<adf-custom-header-filter-template>
|
<adf-custom-header-filter-template>
|
||||||
<ng-template let-col>
|
<ng-template let-col>
|
||||||
@@ -39,6 +40,7 @@
|
|||||||
[currentFolderNodeId]="node?.id"
|
[currentFolderNodeId]="node?.id"
|
||||||
[maxItems]="(documentList?.pagination | async)?.maxItems"
|
[maxItems]="(documentList?.pagination | async)?.maxItems"
|
||||||
[skipCount]="(documentList?.pagination | async)?.skipCount"
|
[skipCount]="(documentList?.pagination | async)?.skipCount"
|
||||||
|
[sorting]="filterSorting"
|
||||||
(update)="onFilterUpdate($event)"
|
(update)="onFilterUpdate($event)"
|
||||||
(clear)="onAllFilterCleared()"
|
(clear)="onAllFilterCleared()"
|
||||||
>
|
>
|
||||||
|
@@ -66,6 +66,7 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges {
|
|||||||
canUpload = false;
|
canUpload = false;
|
||||||
nodeResult: NodePaging;
|
nodeResult: NodePaging;
|
||||||
showHeader = ShowHeaderMode.Always;
|
showHeader = ShowHeaderMode.Always;
|
||||||
|
filterSorting = null;
|
||||||
|
|
||||||
protected subscriptions: Subscription[] = [];
|
protected subscriptions: Subscription[] = [];
|
||||||
|
|
||||||
@@ -164,6 +165,10 @@ export abstract class PageComponent implements OnInit, OnDestroy, OnChanges {
|
|||||||
this.nodeResult = newNodePaging;
|
this.nodeResult = newNodePaging;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onSortingChanged(event) {
|
||||||
|
this.filterSorting = event.detail.key + '-' + event.detail.direction;
|
||||||
|
}
|
||||||
|
|
||||||
onAllFilterCleared() {
|
onAllFilterCleared() {
|
||||||
if (!this.isOutletPreviewUrl()) {
|
if (!this.isOutletPreviewUrl()) {
|
||||||
this.documentList.node = null;
|
this.documentList.node = null;
|
||||||
|
Reference in New Issue
Block a user