Order by folder (#5945)

This commit is contained in:
Eugenio Romano 2020-08-03 14:09:42 +01:00 committed by GitHub
parent f740364e3a
commit c66ad49f03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -1451,7 +1451,7 @@ describe('DocumentList', () => {
where: undefined, where: undefined,
maxItems: 25, maxItems: 25,
skipCount: 0, skipCount: 0,
orderBy: ['nodeType DESC', 'name asc' ], orderBy: ['isFolder DESC', 'name asc' ],
rootFolderId: 'fake-id' rootFolderId: 'fake-id'
}, ['test-include']); }, ['test-include']);
}); });
@ -1467,7 +1467,7 @@ describe('DocumentList', () => {
where: '(isFolder=true)', where: '(isFolder=true)',
maxItems: 25, maxItems: 25,
skipCount: 0, skipCount: 0,
orderBy: ['nodeType DESC', 'name asc' ], orderBy: ['isFolder DESC', 'name asc' ],
rootFolderId: 'fake-id' rootFolderId: 'fake-id'
}, ['test-include']); }, ['test-include']);
}); });
@ -1484,7 +1484,7 @@ describe('DocumentList', () => {
maxItems: 25, maxItems: 25,
skipCount: 0, skipCount: 0,
where: undefined, where: undefined,
orderBy: ['nodeType DESC', 'size DESC'], orderBy: ['isFolder DESC', 'size DESC'],
rootFolderId: 'fake-id' rootFolderId: 'fake-id'
}, ['test-include']); }, ['test-include']);
}); });
@ -1502,7 +1502,7 @@ describe('DocumentList', () => {
expect(documentListService.getFolder).toHaveBeenCalledWith(null, { expect(documentListService.getFolder).toHaveBeenCalledWith(null, {
maxItems: 25, maxItems: 25,
skipCount: 0, skipCount: 0,
orderBy: ['nodeType DESC', 'name asc' ], orderBy: ['isFolder DESC', 'name asc' ],
rootFolderId: 'folder-id', rootFolderId: 'folder-id',
where: undefined where: undefined
}, undefined); }, undefined);

View File

@ -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. * rule to be added to the sorting apart from the one driven by the header.
*/ */
@Input() @Input()
additionalSorting = ['nodeType DESC']; additionalSorting = ['isFolder DESC'];
/** Defines sorting mode. Can be either `client` (items in the list /** Defines sorting mode. Can be either `client` (items in the list
* are sorted client-side) or `server` (the ordering supplied by the * are sorted client-side) or `server` (the ordering supplied by the