When switching data sources dir-pagination-controls displays wrong number of results
See original GitHub issueThe code below displays 37 pages when vm.totalResults
is zero. The issue only happens in one scenario:
- Display a user with 37 results
- Hide that user data with
ng-if
go to another user with 0 results - User displays 37 results.
- Refresh the page (F5 in browser) and now the pagination control goes away as it should as there are 0 results.
Why is this happening?
<md-list-item dir-paginate="alert in vm.allAlerts | itemsPerPage: vm.pageSize" total-items="vm.totalResults" current-page="vm.currentPage" pagination-id="customerAlerts">
//More code...
<dir-pagination-controls on-page-change="vm.alertsReload(newPageNumber)" layout="row" layout-align="center center" pagination-id="customerAlerts"></dir-pagination-controls>
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Why I get error on multiple dir-pagination in AngularJs?
I want to create pagination using angular. But when I added the pagination-id attribute it throw an error and the data doesn't load....
Read more >Paging: DevExtreme - JavaScript UI Components for Angular ...
Paging is used to load data in portions, which improves the UI component's performance on large datasets. Paging is enabled by default. You...
Read more >Guidelines for Creating Task Flows to Be Used in Oracle Composer ...
If fetchSize is greater than autoHeightRows , you can decide whether to display only as many records as the autoHeightRows value or provide...
Read more >jQuery Grid Documentation - Paging - Kendo UI for ... - Telerik
Define the number of records for the Grid to display on each page. · Define the total number of records in the dataset....
Read more >How To Query Tables and Paginate Data in Flask-SQLAlchemy
You'll order the results by a column value, and count and limit query results. Finally, you'll use pagination to display a certain number...
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
After more research I see that
dirPaginateDirective
does not fire when I show/hide my data by togglingng-if=
. The app.Controller reloads, creating new state, but the said directive does not recompile and capture the new state when there is no data to display.I will work on a plunker reproduction of the issue. This page only has 1 dir-pagination, however there are at least 2 others used in the site. I see three active, uniquely named paginationid’s in the
paginationService.instances
. One uses the__default
name, however the one I am experiencing a problem with uses the namecustomerAlerts
unique to this pagination controller.