-
Notifications
You must be signed in to change notification settings - Fork 244
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
Page number not updating after data reloadig #373
Comments
Hi, it's difficult to tell what exactly is wrong from the code provided. One thing that caught my attention is that in the |
Sorry, that's mistake I've made copying and adapting code for github... |
OK. Can you provide a reproduction of the behaviour, or at least some more code? |
Seems solved this via the @ViewChild decorator.
|
That's good, though it seems like an unusual case to need to use ViewChild to make this work. If you are satisfied that it works ok in your case, you can close this issue. |
I can confirm the issue. I jumped from version 3.1.1 to 5.0.0 and can see the wrong behaviour only on last version. The same test on version 3.1.1 works perfectly.
|
I have some page with a table and pagination on it. And user can execute some actions with a data on that table and after pressing a submit button - data reloads (taking new value from a backend) and pagination should jump on a first page. I'm doing this setting the page number in an
ngOnChanges
event. And data DOES displaying the first page after reload, but page number remains one I left on.Pagination initialization:
<tr *ngFor="let row of data | paginate: { id: id, itemsPerPage: itemsPerPage, currentPage: page }; let i = index"></tr>
pagination-controls:
onChanges event:
What I'm doing wrong?
The text was updated successfully, but these errors were encountered: