Skip to content
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

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

Open
fabiogouw opened this issue Nov 7, 2017 · 1 comment
Open

Comments

@fabiogouw
Copy link

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.

@RobBowman
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants