Last pagination's page not working (1.12.1, server side)

Last pagination's page not working (1.12.1, server side)

Uff182Uff182 Posts: 2Questions: 0Answers: 0

Hello,
I'm facing an issue with DT 1.12.1 and server side elaboration. The problem is pagination related: when clicking the last page number, the web call performed to my application is performed with the start value of the penultimate page.

Let's say I have 105 results, showing 10 per page. I get 11 pages, which is fine. When I click on page 11, the web call is performed passing the following parameters (just like on page 10):

start 90
length 10

In this way I can only load values from 91 to 100; page 11 doesn't get selected. This happens both on filtered and unfiltered searches.
Is there anything I can investigate?

Thanks.

Replies

  • allanallan Posts: 61,618Questions: 1Answers: 10,089 Site admin

    Something is certainly going wrong somewhere, but I think I'll need a link to a test case showing the issue to be able to help much with this one. I haven't been able to reproduce the error in any of our examples.

    Allan

  • Uff182Uff182 Posts: 2Questions: 0Answers: 0

    Hi Allan, I think I got it.
    In my code I was listening to the page.dt event. The function that was listening to it had this part of code inside:

    $('#orders-table tbody tr').each(function(){
        oTable.row($(this)).remove();
    });
    

    I thought this was necessary to remove rows from being visible. After commenting this part of code, the last page now works fine.

Sign In or Register to comment.