mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4039] Copy/Move of the files/folders is not working when the root folder of the user is chosen. (#4280)
* fix infinite pagination test * ready event only after full source * infinite init to pagesize maxitems * infinite init to pagesize maxitems * infinite init to pagesize maxitems
This commit is contained in:
@@ -217,7 +217,7 @@ describe('InfinitePaginationComponent', () => {
|
||||
|
||||
expect(spyTarget).toHaveBeenCalledWith({
|
||||
skipCount: 0,
|
||||
maxItems: 25,
|
||||
maxItems: 50,
|
||||
hasMoreItems: false,
|
||||
merge: false
|
||||
});
|
||||
@@ -231,7 +231,7 @@ describe('InfinitePaginationComponent', () => {
|
||||
component.onLoadMore();
|
||||
|
||||
expect(spyTarget).toHaveBeenCalledWith({
|
||||
maxItems: 7,
|
||||
maxItems: 14,
|
||||
skipCount: 0,
|
||||
hasMoreItems: false,
|
||||
merge: false
|
||||
|
@@ -84,6 +84,7 @@ export class InfinitePaginationComponent implements OnInit, OnDestroy, Paginatio
|
||||
|
||||
this.userPreferencesService.select(UserPreferenceValues.PaginationSize).subscribe((pagSize) => {
|
||||
this.pageSize = this.pageSize || pagSize;
|
||||
this.requestPaginationModel.maxItems = this.pageSize;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -91,11 +92,7 @@ export class InfinitePaginationComponent implements OnInit, OnDestroy, Paginatio
|
||||
this.requestPaginationModel.skipCount = 0;
|
||||
this.requestPaginationModel.merge = false;
|
||||
|
||||
if (!this.requestPaginationModel.maxItems) {
|
||||
this.requestPaginationModel.maxItems = this.pageSize;
|
||||
} else {
|
||||
this.requestPaginationModel.maxItems += this.pageSize;
|
||||
}
|
||||
this.requestPaginationModel.maxItems += this.pageSize;
|
||||
|
||||
this.loadMore.next(this.requestPaginationModel);
|
||||
|
||||
|
Reference in New Issue
Block a user