You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using async data and thus I use pageChanged to send a request and get a new page of data. The problem is that when filtering, the amount of pages can obviously decrease and the current page is set to the last page. Now I can understand the logic behind this, but the problem is that it is set to the last page even if the current page is less than the amount of pages. It should only be set to the last page if the current page is actually greater than the amount of pages.
Another thing is that you should be allowed to decide if it should be set to the first or last page. And when automatically setting the current page because the amount of pages changed, the event fired should probably be a different one. I don't like that pageChanged is fired just because the pages shrunk.
The text was updated successfully, but these errors were encountered:
I'm encountering this problem, too. I'm storing my search results in ngrx/store and loading results with fewer pages results in a chain of actions like FETCH_RESULTS_SUCCESS => CHANGE_PAGE => FETCH_RESULTS => FETCH_RESULTS_SUCCESS. This results in duplicate API requests, as well as ExpressionChangedAfterItHasBeenCheckedErrors. It's cumbersome to work around.
YevheniiaMazur
changed the title
Pagination: (pageChanged) event fired when amount of pages decreases
feat(pagination): add event for firing when amount of pages decreases (now pageChanged event is fired)
Jan 15, 2018
I am facing the same issue, I have created our custom component around ngx-bootstrap pagination component, which sets the itemsPerPage and it has its own event but the pagechanged event is firing irrespective of that. And I dont want to come back to last page after page changed instead to first. Please if anyone can help with the workaround that. Thanks
I am using async data and thus I use pageChanged to send a request and get a new page of data. The problem is that when filtering, the amount of pages can obviously decrease and the current page is set to the last page. Now I can understand the logic behind this, but the problem is that it is set to the last page even if the current page is less than the amount of pages. It should only be set to the last page if the current page is actually greater than the amount of pages.
Another thing is that you should be allowed to decide if it should be set to the first or last page. And when automatically setting the current page because the amount of pages changed, the event fired should probably be a different one. I don't like that pageChanged is fired just because the pages shrunk.
The text was updated successfully, but these errors were encountered: