mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
pagination fixes (#2448)
This commit is contained in:
committed by
Eugenio Romano
parent
70182c53aa
commit
31c3a5339a
@@ -981,4 +981,11 @@ describe('DocumentList', () => {
|
||||
|
||||
expect(documentList.resetPagination).toHaveBeenCalledTimes(2);
|
||||
});
|
||||
|
||||
it('should reset folder node upon changing current folder id', () => {
|
||||
documentList.folderNode = <any> {};
|
||||
documentList.ngOnChanges({currentFolderId: new SimpleChange(null, '-sites-', false)});
|
||||
|
||||
expect(documentList.folderNode).toBeNull();
|
||||
});
|
||||
});
|
||||
|
@@ -244,6 +244,7 @@ export class DocumentListComponent implements OnInit, OnChanges, AfterContentIni
|
||||
} else if (changes.currentFolderId && changes.currentFolderId.currentValue) {
|
||||
if (changes.currentFolderId.previousValue !== changes.currentFolderId.currentValue) {
|
||||
this.resetPagination();
|
||||
this.folderNode = null;
|
||||
}
|
||||
if (!this.hasCustomLayout) {
|
||||
this.setupDefaultColumns(changes.currentFolderId.currentValue);
|
||||
|
Reference in New Issue
Block a user