Server pagination not working
See original GitHub issuePagination and Sorting should be handled through the server. To load my data from the backend I´m using the following method:
this.loadData('sortColumn', 'ASC', this.currentPage, this.options.limit)
.subscribe(ratings => {
this.rows = [];
this.rows.push(...ratings.ratings);
this.endRow = this.options.limit * (this.options.offset + 1);
this.maxRows = ratings.recordsTotal;
if (this.maxRows < this.options.limit) {
this.endRow = this.maxRows;
} else if (this.maxRows < this.endRow) {
this.endRow = this.maxRows;
}
this.options.count = this.maxRows;
}, error => this.errorMessage = <any>error);}
this.rows is the variable I´m binding to the data-table-template:
<datatable class="rating_table" [rows]='rows' [options]='options' (onRowClick)='onRowClick($event)' (onPageChange)='onPage($event)'>
My problem is when I´m loading the first page the data binding ( this.rows.push(…ratings.ratings)) works and in the table my ratings are shown, but when I´m loading the second page the new ratings are saved into the this.rows object but the table is not refreshing the ratings from page one are still visible.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:53 (14 by maintainers)
Top Results From Across the Web
Datatable Pagination not working properly on server side
I've generated my table in server side and I was able to get the data from my DB and it works perfect but...
Read more >jquery datatable server-side pagination not working
I'm trying to implement the jquery datatables on a php project using the server-side processing, but the pagination is not working and I ......
Read more >[Explore] Server pagination is not working #15478 - GitHub
Server side pagination has no effect. The server side pagination option for the table chart correctly retrieves the first page of results ...
Read more >Table new page data not loading on click of next button in ...
I can see pagination is showing correct results count and pagination details. But clicking on next button does not load new records in...
Read more >bootstrap-table with server-side pagination not working correctly
Your server code is missing something to handle page number, rows per-page, order etc. Server should only return the rows for that page....
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 FreeTop 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
Top GitHub Comments
Is there any progress on this? I think this is a critical bug.
@stefmabo - can you PR this?