66155: Fixed 'hide last x' algorithm

This commit is contained in:
Kristof De Langhe
2019-11-29 10:17:11 +01:00
parent 6b3a395e4a
commit 380e02a92d
2 changed files with 2 additions and 2 deletions

View File

@@ -11,7 +11,7 @@
</div> </div>
<div *ngIf="limit > originalLimit" class="float-right"> <div *ngIf="limit > originalLimit" class="float-right">
<a [routerLink]="" (click)="viewLess()">{{'item.page.related-items.view-less' | <a [routerLink]="" (click)="viewLess()">{{'item.page.related-items.view-less' |
translate:{ amount: (representations?.length < limit) ? limit - representations?.length : incrementBy } }}</a> translate:{ amount: (representations?.length < limit) ? (representations?.length + incrementBy) - limit : incrementBy } }}</a>
</div> </div>
</div> </div>
</ng-container> </ng-container>

View File

@@ -11,7 +11,7 @@
</div> </div>
<div *ngIf="limit > originalLimit" class="float-right" id="view-less"> <div *ngIf="limit > originalLimit" class="float-right" id="view-less">
<a [routerLink]="" (click)="viewLess()">{{'item.page.related-items.view-less' | <a [routerLink]="" (click)="viewLess()">{{'item.page.related-items.view-less' |
translate:{ amount: (itemsRD?.payload?.page?.length < limit) ? limit - itemsRD?.payload?.page?.length : incrementBy } }}</a> translate:{ amount: (itemsRD?.payload?.page?.length < limit) ? (itemsRD?.payload?.page?.length + incrementBy) - limit : incrementBy } }}</a>
</div> </div>
</div> </div>
</ng-container> </ng-container>