mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +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>>>;
|
originals$: Observable<RemoteData<PaginatedList<Bitstream>>>;
|
||||||
licenses$: Observable<RemoteData<PaginatedList<Bitstream>>>;
|
licenses$: Observable<RemoteData<PaginatedList<Bitstream>>>;
|
||||||
|
|
||||||
pageSize = 5;
|
pageSize = 2;
|
||||||
originalOptions = Object.assign(new PaginationComponentOptions(),{
|
originalOptions = Object.assign(new PaginationComponentOptions(),{
|
||||||
id: 'original-bitstreams-options',
|
id: 'original-bitstreams-options',
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
|
@@ -56,7 +56,9 @@ export class FileSectionComponent implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
this.currentPage++;
|
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)),
|
filter((bitstreamsRD: RemoteData<PaginatedList<Bitstream>>) => hasValue(bitstreamsRD)),
|
||||||
takeWhile((bitstreamsRD: RemoteData<PaginatedList<Bitstream>>) => hasNoValue(bitstreamsRD.payload) && hasNoValue(bitstreamsRD.error), true)
|
takeWhile((bitstreamsRD: RemoteData<PaginatedList<Bitstream>>) => hasNoValue(bitstreamsRD.payload) && hasNoValue(bitstreamsRD.error), true)
|
||||||
).subscribe((bitstreamsRD: RemoteData<PaginatedList<Bitstream>>) => {
|
).subscribe((bitstreamsRD: RemoteData<PaginatedList<Bitstream>>) => {
|
||||||
@@ -64,6 +66,8 @@ export class FileSectionComponent implements OnInit {
|
|||||||
this.bitstreams$.next([...current, ...bitstreamsRD.payload.page]);
|
this.bitstreams$.next([...current, ...bitstreamsRD.payload.page]);
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.isLastPage = hasNoValue(bitstreamsRD.payload.next);
|
this.isLastPage = hasNoValue(bitstreamsRD.payload.next);
|
||||||
|
console.log("lel");
|
||||||
|
console.log(this.isLastPage);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user