question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update totalItems does not update pageNumber (server-side)

See original GitHub issue

Angular version: 4.2.x

ngx-pagination version: v3.0.0

Description of issue: I’m using the server side pagination example and it works fine. When I’m updating the totalItems (after adding an item for example) the number of pages does not get updated when totalItems is exceeding the currentpages.

Example:

  paginationConfig: PaginationInstance = {
    currentPage: 1,
    itemsPerPage: 5,
  };

Total Items initial call returns for example: 50. => 10 pages à 5 items => OK

Backend call returns now +1 => should result in 11 pages, it does not.

Steps to reproduce:

  • Implement server side pagination as it is in example
  • add a function which simulates a backend call which returns totalItems += 1
  • set totalItems of config to the returned response from simulated backend call
  • no change on page

Expected result: updated pages.

Actual result: no update in pages

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
emreavsarcommented, Jun 22, 2017

And thanks.

0reactions
emreavsarcommented, Jun 22, 2017

Oh yeah, you’re right. That’s quite interesting. I have to compare this with my solution to figure out what I’m doing wrong then.

I’ll update this issue then.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Total number of pages in document not updating on front page ...
At the moment I have it set up so right click mouse and then click on update field and it updates to reflect...
Read more >
Server-side, total pages and number of rows not shown
Hi, I am sending back a response to my DT but the information in the footer of the table is not updating. Here...
Read more >
php - Update data on a page without refreshing - Stack Overflow
I want to be able to refresh the status without having my viewers to have and reload the whole page. I know there...
Read more >
Refresh set filter items after data update with server-side row ...
This post will show you how to refresh set filter items after a data update when you're using server-side row model in ag-Grid....
Read more >
Using AWS CLI pagination options
Server -side pagination parameters process first and any output is sent to ... Line Interface (AWS CLI) has multiple options to control the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found