The pagination's Next button doesn't disable properly when the table is empty

The pagination's Next button doesn't disable properly when the table is empty

ttevendalettevendale Posts: 1Questions: 1Answers: 0

I've recently updated to the latest datatables version and I discovered that the next button doesn't properly disable when the table is empty.

Steps for reproducing the bug:
1. Enter something into the search box that will clear the table (asdf).
2. Hover over the previous and next buttons.
3. Notice the next button seems like it is enabled.

Here's a link that I was able to reproduce the issue with.
https://datatables.net/

This bug does not exist in version 1.10.19.

I believe the issue is related to this commit.
https://github.com/DataTables/DataTables/commit/94d67b5ebc38bbaf3ea675c2efc50bf018727031

When I replace the pageButton in 1.10.20 with 1.10.19's pageButton the issue is fixed.
around line 14545 in jquery.dataTables.js.

Thanks for your time.

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Hi @ttevendale ,

    Yep, I can reproduce, thanks for flagging the problem. I've raised it internally (DD-1241 for my reference) and we'll report back here when there's an update.

    Cheers,

    Colin

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    This has now been fixed and can be found in the nightly builds. You can find the nightly releases here. We're aiming to make releases in the next week or so. Please keep an eye on the blog posts.

    Colin

This discussion has been closed.