mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACA-3542] - added sorting for filters (#5932)
* [ACA-3542] - added sorting for filters * [ACA-3542] - removed wrong parameter * [ACA-3542] - fixed test with fixed sorting mode parameter * Update content-node-selector-panel.component.html * fix e2e * fix delete site Co-authored-by: Eugenio Romano <eromano@users.noreply.github.com> Co-authored-by: Eugenio Romano <eugenio.romano@alfresco.com>
This commit is contained in:
@@ -567,7 +567,7 @@
|
||||
"ascending": true
|
||||
},
|
||||
{
|
||||
"key": "createdByUser",
|
||||
"key": "createdByUser.displayName",
|
||||
"label": "Author",
|
||||
"type": "FIELD",
|
||||
"field": "cm:creator",
|
||||
|
@@ -229,7 +229,7 @@
|
||||
[sortingMode]="sortingMode"
|
||||
[showHeader]="showHeader"
|
||||
[thumbnails]="thumbnails"
|
||||
[stickyHeader]="stickyHeader"
|
||||
[stickyHeader]="stickyHeader"
|
||||
(error)="onNavigationError($event)"
|
||||
(success)="resetError()"
|
||||
(ready)="emitReadyEvent($event)"
|
||||
@@ -242,6 +242,7 @@
|
||||
<adf-search-header [col]="col"
|
||||
[value]="paramValues? paramValues[col.key] : null"
|
||||
[currentFolderNodeId]="currentFolderId"
|
||||
[sorting]="filterSorting"
|
||||
[maxItems]="pagination?.maxItems"
|
||||
[skipCount]="pagination?.skipCount"
|
||||
(update)="onFilterUpdate($event)"
|
||||
|
@@ -88,7 +88,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
processId;
|
||||
|
||||
@Input()
|
||||
sorting = ['nodeType', 'DESC'];
|
||||
sorting = ['name', 'ASC'];
|
||||
|
||||
@Input()
|
||||
sortingMode = 'server';
|
||||
@@ -163,7 +163,10 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
enableCustomHeaderFilter = false;
|
||||
|
||||
@Input()
|
||||
paramValues: Map <any, any> = null;
|
||||
paramValues: Map<any, any> = null;
|
||||
|
||||
@Input()
|
||||
filterSorting: string = null;
|
||||
|
||||
@Output()
|
||||
documentListReady: EventEmitter<any> = new EventEmitter();
|
||||
@@ -208,7 +211,7 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
|
||||
enableMediumTimeFormat = false;
|
||||
displayEmptyMetadata = false;
|
||||
hyperlinkNavigation = false;
|
||||
filtersStates: any[] = [];
|
||||
filteredSorting: string[] = null;
|
||||
|
||||
constructor(private notificationService: NotificationService,
|
||||
private uploadService: UploadService,
|
||||
|
@@ -4,6 +4,8 @@
|
||||
[showSettingsPanel]="false"
|
||||
[navigationRoute]="navigationRoute"
|
||||
[currentFolderId]="currentFolderId"
|
||||
[filterSorting]="filterSorting"
|
||||
[enableCustomHeaderFilter]="true"
|
||||
[paramValues]="queryParams">
|
||||
[paramValues]="queryParams"
|
||||
(sorting-changed)="onSortingChanged($event)">
|
||||
</app-files-component>
|
||||
|
@@ -30,6 +30,7 @@ export class FilteredSearchComponent {
|
||||
currentFolderId = '-my-';
|
||||
|
||||
queryParams = null;
|
||||
filterSorting = null;
|
||||
|
||||
constructor(@Optional() private route: ActivatedRoute) {
|
||||
|
||||
@@ -46,4 +47,8 @@ export class FilteredSearchComponent {
|
||||
}
|
||||
}
|
||||
|
||||
onSortingChanged(event) {
|
||||
this.filterSorting = event.detail.column + '-' + event.detail.direction;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user