mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[ADF-4042] fix reset pagination issue when enter in a folder (#4281)
* fix reset pagination issue when enter in a folder * fix pagination new folder issue and infintie pagiantion
This commit is contained in:
@@ -1295,4 +1295,24 @@ describe('DocumentList', () => {
|
||||
rootFolderId: 'fake-id'
|
||||
}, ['test-include']);
|
||||
});
|
||||
|
||||
it('should reset the pagination when enter in a new folder', () => {
|
||||
let folder = new FolderNode();
|
||||
documentList.navigationMode = DocumentListComponent.SINGLE_CLICK_NAVIGATION;
|
||||
documentList.updatePagination({
|
||||
maxItems: 10,
|
||||
skipCount: 10
|
||||
});
|
||||
|
||||
spyOn(documentListService, 'getFolder').and.callThrough();
|
||||
|
||||
documentList.onNodeClick(folder);
|
||||
|
||||
expect(documentListService.getFolder).toHaveBeenCalledWith(null, {
|
||||
maxItems: 25,
|
||||
skipCount: 0,
|
||||
rootFolderId: 'folder-id',
|
||||
where: undefined
|
||||
}, undefined);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user