the use of SearchPanes within pages in the pagination leads to "no result"

the use of SearchPanes within pages in the pagination leads to "no result"

medarobmedarob Posts: 12Questions: 3Answers: 0

Link to test case:
this is one of the official examples: https://datatables.net/extensions/searchpanes/examples/initialisation/viewTotalCascade.html

Description of problem:
In the example, if you click on one of the pages (for example the last page) in the pagination and then select a value from a SearchPane, you will not see a result in the table although there should be one or more results.

The problem seems to be that there is no reload of the table and if there are fewer results than necessary, so that you will see the results for the current pagination page, then no results are shown because you are still on the "wrong" page.

Although, the wording is wrong: Showing 51 to 2 of 2 entries.
Correct is: Showing 1 to 2 of 2 entries. (after I click on page 1 in the pagination)

It works with the search field. If you are on the last page and enter a search word in the search field, the table automatically jumps to page 1 and displays the results in question.

Is it possible to set this for SearchPanes with an option so that it automatically jumps to the first page in this case? (or at the last possible page with results?)

In the example you see that if you don't select page 1, then no values are shown. Only after I click on page 1 the two results will be shown.


Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    That's total junk isn't it... Sorry about that. SP is in real need of an overhaul - which will happen sometime this year.

    In the meantime, I've committed a fix for this issue, which will land in the next release.

    Thanks for flagging it up.

    Allan

  • medarobmedarob Posts: 12Questions: 3Answers: 0

    Thank you!

    I'm looking forward to the next version :)

Sign In or Register to comment.