[ADF-2406] [Document Picker] Unnecessary extra request is made on Load more click (#3019)

* [ADF-2406] [Document Picker] Unnecessary extra request is made on Load more click

fixed bug

* [ADF-2406] refactored code

* [ADF-2406] added tests
This commit is contained in:
suzanadirla
2018-03-06 11:19:06 +02:00
committed by Denys Vuika
parent ac994ed7af
commit c1f0537a0d
2 changed files with 27 additions and 2 deletions

View File

@@ -577,8 +577,7 @@ export class DocumentListComponent implements OnInit, OnChanges, OnDestroy, Afte
private isSkipCountChanged(changePage: SimpleChanges) {
return changePage.skipCount &&
!changePage.skipCount.isFirstChange() &&
changePage.skipCount.currentValue !== null &&
changePage.skipCount.currentValue !== undefined &&
changePage.skipCount.currentValue &&
changePage.skipCount.currentValue !== changePage.skipCount.previousValue;
}