https://datatables.net/examples/api/multi_filter.html:-Pagination button not working.

https://datatables.net/examples/api/multi_filter.html:-Pagination button not working.

aatishaatish Posts: 7Questions: 2Answers: 0

Individual column searching (text inputs): In this example while doing individual search column from footer search, it is not allowing me to go to next page when i click on next button first time while on second click it is working fine i.e. i can see the second page.
Please advise me in this issue. Thanks in advance.

Replies

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    The example works fine, so you must be doing something different. Note that "Next" will do nothing if there is only one page of visible data.

  • aatishaatish Posts: 7Questions: 2Answers: 0

    when i search 's' from position search text in footer and i click on next button then for first click it is not going on next page whereas when i again click it, it is working fine. You can try searching in any footer search column. Overall this example is working fine. Please advice. Thanks.

  • allanallan Posts: 63,700Questions: 1Answers: 10,502 Site admin

    This example.

    Steps to reproduce:

    1. Load page
    2. Click to focus on Position column's footer input element
    3. Type s - table correctly filters
    4. Click on 2 paging button without blurring the input element's focus
    5. Page stays on page 1

    If you could write bug reports in this manner in future, with reproducible steps it would greatly help - thanks.

    The issue here is the use of both the keyup and the change events. When you click outside the input element after entering the s it will trigger the change event and thus filter the table. That in turn causes it to reset the paging - so the paging that you have just set, will have been displayed, but is immediately overwritten be the filtering redraw.

    Fix options:

    1. Remove the change event
    2. Add a check to ensure that the filtering value being given is different from the one given before.

    My preference is the latter, and I've committed the fix.

    Thanks for letting me know about this issue.

    Allan

This discussion has been closed.