mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[Task 72397] adding debug consoles and pageSize
This commit is contained in:
@@ -29,7 +29,7 @@ export class FullFileSectionComponent extends FileSectionComponent implements On
|
||||
originals$: Observable<RemoteData<PaginatedList<Bitstream>>>;
|
||||
licenses$: Observable<RemoteData<PaginatedList<Bitstream>>>;
|
||||
|
||||
pageSize = 5;
|
||||
pageSize = 2;
|
||||
originalOptions = Object.assign(new PaginationComponentOptions(),{
|
||||
id: 'original-bitstreams-options',
|
||||
currentPage: 1,
|
||||
|
@@ -56,7 +56,9 @@ export class FileSectionComponent implements OnInit {
|
||||
} else {
|
||||
this.currentPage++;
|
||||
}
|
||||
this.bitstreamDataService.findAllByItemAndBundleName(this.item, 'ORIGINAL', { currentPage: this.currentPage }).pipe(
|
||||
console.log(this.isLastPage);
|
||||
console.log(this.currentPage);
|
||||
this.bitstreamDataService.findAllByItemAndBundleName(this.item, 'ORIGINAL', { currentPage: this.currentPage, elementsPerPage: 1 }).pipe(
|
||||
filter((bitstreamsRD: RemoteData<PaginatedList<Bitstream>>) => hasValue(bitstreamsRD)),
|
||||
takeWhile((bitstreamsRD: RemoteData<PaginatedList<Bitstream>>) => hasNoValue(bitstreamsRD.payload) && hasNoValue(bitstreamsRD.error), true)
|
||||
).subscribe((bitstreamsRD: RemoteData<PaginatedList<Bitstream>>) => {
|
||||
@@ -64,6 +66,8 @@ export class FileSectionComponent implements OnInit {
|
||||
this.bitstreams$.next([...current, ...bitstreamsRD.payload.page]);
|
||||
this.isLoading = false;
|
||||
this.isLastPage = hasNoValue(bitstreamsRD.payload.next);
|
||||
console.log("lel");
|
||||
console.log(this.isLastPage);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user