From c66ad49f03cd6c22ae3a7a6595df989519449d4a Mon Sep 17 00:00:00 2001 From: Eugenio Romano Date: Mon, 3 Aug 2020 14:09:42 +0100 Subject: [PATCH] Order by folder (#5945) --- .../components/document-list.component.spec.ts | 8 ++++---- .../document-list/components/document-list.component.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/content-services/src/lib/document-list/components/document-list.component.spec.ts b/lib/content-services/src/lib/document-list/components/document-list.component.spec.ts index 4443477308..2c9ba0284e 100644 --- a/lib/content-services/src/lib/document-list/components/document-list.component.spec.ts +++ b/lib/content-services/src/lib/document-list/components/document-list.component.spec.ts @@ -1451,7 +1451,7 @@ describe('DocumentList', () => { where: undefined, maxItems: 25, skipCount: 0, - orderBy: ['nodeType DESC', 'name asc' ], + orderBy: ['isFolder DESC', 'name asc' ], rootFolderId: 'fake-id' }, ['test-include']); }); @@ -1467,7 +1467,7 @@ describe('DocumentList', () => { where: '(isFolder=true)', maxItems: 25, skipCount: 0, - orderBy: ['nodeType DESC', 'name asc' ], + orderBy: ['isFolder DESC', 'name asc' ], rootFolderId: 'fake-id' }, ['test-include']); }); @@ -1484,7 +1484,7 @@ describe('DocumentList', () => { maxItems: 25, skipCount: 0, where: undefined, - orderBy: ['nodeType DESC', 'size DESC'], + orderBy: ['isFolder DESC', 'size DESC'], rootFolderId: 'fake-id' }, ['test-include']); }); @@ -1502,7 +1502,7 @@ describe('DocumentList', () => { expect(documentListService.getFolder).toHaveBeenCalledWith(null, { maxItems: 25, skipCount: 0, - orderBy: ['nodeType DESC', 'name asc' ], + orderBy: ['isFolder DESC', 'name asc' ], rootFolderId: 'folder-id', where: undefined }, undefined); diff --git a/lib/content-services/src/lib/document-list/components/document-list.component.ts b/lib/content-services/src/lib/document-list/components/document-list.component.ts index 80951a20a5..c33d39cbe4 100644 --- a/lib/content-services/src/lib/document-list/components/document-list.component.ts +++ b/lib/content-services/src/lib/document-list/components/document-list.component.ts @@ -190,7 +190,7 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte * rule to be added to the sorting apart from the one driven by the header. */ @Input() - additionalSorting = ['nodeType DESC']; + additionalSorting = ['isFolder DESC']; /** Defines sorting mode. Can be either `client` (items in the list * are sorted client-side) or `server` (the ordering supplied by the