Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic pagination does not work if the limit is changed and the active page is not the first #978

Closed
FrancescoBorzi opened this issue Sep 12, 2017 · 3 comments

Comments

@FrancescoBorzi
Copy link
Contributor

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

This bug affects both client-side and server-side pagination, I've tested on both.

Current behavior
If you change the [limit] of items per page when you are at page 1 then it works fine, but if you do the same action while being in the last page and set a higher [limit] then it will not work and an empty table will be shown just empty.

Expected behavior
The limit of the items per page should always work, regardless of which page you are currently.

Reproduction of the problem
Using this plunker:

http://plnkr.co/edit/2X96Y1PJKAJM3lolcy2s?p=preview

  • select the limit of 5 items per page
  • go to the last page (page 20)
  • select the limit of 10 items per page

then the table will be empty, which is a bug.

  • Table version: 0.8.x
    10.2.3

  • Angular version: 2.0.x
    4.3.6

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Chrome

  • Language: [all | TypeScript X.X | ES6/7 | ES5]
    TypeScript 2.4.1

@FrancescoBorzi
Copy link
Contributor Author

@wizarrc can you take a look at this?

@wizarrc
Copy link
Contributor

wizarrc commented Sep 12, 2017

@ShinDarth That's cause the offset is too high for a higher limit, therefore showing empty.

@amcdnl amcdnl closed this as completed in 78a6c46 Sep 12, 2017
amcdnl added a commit that referenced this issue Sep 12, 2017
Adds bounds to offset Fixes #978
@FrancescoBorzi
Copy link
Contributor Author

@amcdnl @wizarrc thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants