diff --git a/libs/openchallenges/challenge-search/src/lib/challenge-search.component.html b/libs/openchallenges/challenge-search/src/lib/challenge-search.component.html index 41fe068288..490748ab8d 100644 --- a/libs/openchallenges/challenge-search/src/lib/challenge-search.component.html +++ b/libs/openchallenges/challenge-search/src/lib/challenge-search.component.html @@ -160,7 +160,6 @@

/> diff --git a/libs/openchallenges/ui/src/lib/paginator/paginator.component.ts b/libs/openchallenges/ui/src/lib/paginator/paginator.component.ts index 9ba3a2e84c..cc9b3f9e86 100644 --- a/libs/openchallenges/ui/src/lib/paginator/paginator.component.ts +++ b/libs/openchallenges/ui/src/lib/paginator/paginator.component.ts @@ -5,6 +5,7 @@ import { Output, EventEmitter, ViewChild, + OnInit, } from '@angular/core'; import { Paginator, @@ -18,7 +19,7 @@ import { templateUrl: './paginator.component.html', styleUrls: ['./paginator.component.scss'], }) -export class PaginatorComponent { +export class PaginatorComponent implements OnInit { @Input({ required: true }) pageNumber = 0; // index of the new page @Input({ required: false }) pageLinkSize = 5; @Input({ required: true }) pageSize = 0; // number of items to display in new page @@ -29,10 +30,9 @@ export class PaginatorComponent { itemIndex = 0; // index of the first item in the new page - // change itemIndex's value will not dynamically trigger selection updates - seems a primeng issue - // ngOnInit(): void { - // this.itemIndex = this.pageNumber * this.pageSize; - // } + ngOnInit(): void { + this.itemIndex = this.pageNumber * this.pageSize; + } onPageChange(event: any): void { this.pageChange.emit(event);