Question about items-per-page
See original GitHub issueHi Michael!
Still loving the plugin! Right now our issue is that when changing pages it seems like the items are being loaded in/out of the dom; this seems to be causing some delay/jumping of the content when changing pages (its a list of ul li’s with one 5 li’s, one li being an svg image).
However, once we have gone through all the pagination pages, changing pages runs smooth as butter.
Would you happen to have an idea why this happens and how to fix it? 😃
=======
Angular version: 6.0.3
ngx-pagination version: 3.1.1
Any relevant code: in the app.html:
<!--previous -->
<a class="circle circle-left" (click)="leftArrowJump() ;!p.isFirstPage() ? p.previous() : p.setCurrent(p.getLastPage())"><i class="material-icons arrow">keyboard_arrow_left</i></a>
<!--airline cards -->
<div class="airline-content grid-x grid-margin-x large-up-5 medium-up-3 small-up-1 align-center" id="stuck-prev">
<app-airline-card
*ngFor="let airline of shownAirlines | paginate: { itemsPerPage: 20, currentPage: page }"
[airline]="airline">
</app-airline-card>
</div>
<!--next -->
<a class="circle circle-right" (click)="rightArrowJump() ;!p.isLastPage() ? p.next() : p.setCurrent(1)"><i class="material-icons arrow">keyboard_arrow_right</i></a>
<!--pages (dots)-->
<pagination-template #p="paginationApi" (pageChange)="page = $event">
<div class="dots-container">
<div class="dot-div" *ngFor="let page of p.pages">
<ol id="page-dots" (click)="p.setCurrent(page.value)">
<li [ngClass]="{'active': p.getCurrent() === page.value}">•</li>
</ol>
</div>
</div>
</pagination-template>
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
The itemsPerPage id argument does not match a registered ...
I just noticed that I'm using angularjs version 2 above,thus i need to add the pagination id at after itemsPerPage as
Read more >why views items per page set to specific values
To be brutally simple: Because someone thought it to be good UX, maintainers agreed, and no one convinced them other way since then....
Read more >Pagination (Number of items per page) problem - WordPress.org
There is a problem in pagination. Number of items per page (in screen options) not working and I can only see 5 items...
Read more >SAP Cloud Platform Authorization API items per page ...
We need to know what the maximum number of items per page is displayed in the payload of the resulting HTTP Call to...
Read more >Addepar OA (Frontend + Backend) - LeetCode Discuss
There is a coding question and 3 multiple choice question. ... Also given sortParamenter , sortOrder , pageNumber , itemsPerPage . You have...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This is just the way that ngFor works. As I mentioned above, you can alter this by using a trackBy function:
See this modified demo - you can compare the DOM elements between pages and you’ll see that the objects are now identical.
Great! Glad that fixed it for you 👍