We have moved to GitHub Issues
Created by Marcel van Helmont 18 Jun 2018, 08:11:03 Updated by Sebastiaan Janssen 25 Jun 2018, 09:40:55Tags: PR
Your report will have a greater chance of being addressed if you can give us clear steps to reproduce the issue, please answer the following questions in as much detail as possible: What did you do? Created a custom property editor that uses a umbPagination directive with a pagesize dropdown.
What did you expect to happen? pagination control update correctly.
What actually happened? the total pages changes but the page buttons remains the same. So if you have 10 items and a pagesize of 5 then you get 2 pages. Changing this by the dropdown control is not getting updated and still shows 2 pages even when page size is set to 10.
I tried to reproduce this on the dev-v7 branch. And I can't reproduce it.
I created a test dashboard to reproduce it. If I click on the pagination links on top the number of pages in the pagination directive get updated correctly.
By the way the test dashboard is attached.
Thanks @dawoe - I was also just looking to figure out how to reproduce the issue. @mvanhelmont can you look at Dave's code and point out what he is doing differently from you please?
@dave @sebastiaan Thanks for your quick response.. After a long evening yesterday i finally found the different. If you remove ng-if="totalPages" (this is also not in de documentation) then you get the same result i have in your sample code. I have absolutely no idea why this is necessary.
also curious why there is a watch inside the directive and not the activate(); on the goToPage, prev and next functions it's the same result. Not fixing the ng-if but just curious.
@mvanhelmont i will test it again. I think I have the ng-if there to hide the pager when there are no results.
But totalPages will always be true because of you setting it initial to 0. The current if statement check only if totalPages had been defined or am i missing something?
I could reproduce it without having the ng-if statement.
And I can confirm your PR fixes it. Will do some extra testing.
Backwards Compatible: True
Fix Submitted: Pull request
Due in version: 7.12.0