Skip to content

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

@fabiogouw

Description

@fabiogouw

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions