Pagination messed up in one case

Pagination messed up in one case

dmcleandmclean Posts: 55Questions: 2Answers: 0

Description of problem: So I've now updated to the latest versions of everything we're using (base + buttons, ColReorder, FixedHeader, Responsive, Select).

We added a new filter, and when the new filter is used, the pagination fails - all the records are displayed, rather than 10 per page. Without the filter, everything is fine, even if records matching that criteria happen to be displayed.

I added try/catch blocks plus enter/exit debug to every function passed to DataTables in the creation call, so it isn't an uncaught exception thrown by any of the render, etc functions.

I looked at the raw data sent back by the server and it doesn't appear to be any different either way.

What else should I be looking for, as far as a cause for something like this?

Replies

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

    Sounds like you might be using server-side processing and returning to many records? If you can give me a link to a page showing the issue and I'll be able to confirm what is going wrong.

    Allan

  • dmcleandmclean Posts: 55Questions: 2Answers: 0

    So if the page size is 10, and the server returns 37 records, then the server is wrong - it should return only 10 records? That would definitely explain it.

    Unfortunately, this is for an internal system that controls Space Telescope data, so it is behind a firewall, per NASA policy.

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

    So if the page size is 10, and the server returns 37 records, then the server is wrong

    If you have server-side processing enabled (serverSide) then yes. If the DataTable requests a set of records, it expects only that set back.

    Allan

  • dmcleandmclean Posts: 55Questions: 2Answers: 0

    I actually knew that - it just didn't occur to me. And I didn't write the server side code.

    Thank your the assistance.

Sign In or Register to comment.