[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:
Eugenio Romano
2019-02-07 01:55:00 +00:00
committed by GitHub
parent 3fd6b5d230
commit 262b37b759
3 changed files with 14 additions and 11 deletions

View File

@@ -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

View File

@@ -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);