-
Notifications
You must be signed in to change notification settings - Fork 512
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
st-pipe not set before st-pagination #148
Comments
Hello, Not sure to understand exactly the issue, could you provide a plunkr ? is this related to #146 ? Thanks, Laurent |
Hmm, I think so. There's no way to determine the number of pages to show simply because the pipe doesn't get run on initial load. |
It is essentially the same issue. If you change stPipe to be a pre-link, it runs before stPagination so the initial call works. As for a plunkr, just add an st-pagination to the pipe/ajax plugin, then remove the initial call to getAPage. It should not work, change stPage to a pre-link and it works. The numberOfPages can then be set in the callback (ala #146 or my sample above). If you need me to I can create an actual plunkr. Brian |
Right. Changing it to a pre |
Ok thanks, took your fix ! |
Did this get released? |
Yes fe73ca3 |
For server side paging scenarios, st-pagination runs before st-pipe, leaving no rows. Switching st-pipe from a link to a pre-link seems to fix it...
I can then set the numberOfPages in the success callback...
tableState.pagination.numberOfPages = Math.ceil(data.totalItems / tableState.pagination.number);
The text was updated successfully, but these errors were encountered: