KoGrid icon indicating copy to clipboard operation
KoGrid copied to clipboard

Issue when the next button is clicked after the page number is typed

Open fabiogouw opened this issue 8 years ago • 1 comments

This bug occurs when we type the number of the page in the pagination control. Just after that, if we click on the next page button, the number of the page is handled as a string and the +1 sum is done in a wrong way. For example, if we type 5 on the page number textbox, clicking on the next page button will take us to the 51th page, not the 6th.

I've recorded the behavior and we can see it in the image below.

kogrid

One way we've found to deal with this problem is changing the code below, converting the value of the "page" variable to number, using the parseInt function.

self.pageForward = function () { var page = self.config.pagingOptions.currentPage(); self.config.pagingOptions.currentPage(Math.min(parseInt(page) + 1, self.maxPages())); };

I'm using Chrome version 62.0.3202.75.

fabiogouw avatar Nov 07 '17 20:11 fabiogouw

I have a similar problem, when I click the "next page" button nothing happens. If I type in the page number then it navigates to that page correctly. Clicking the "previous page" button works ok too.

RobBowman avatar Mar 21 '18 16:03 RobBowman