Upgrading from 1.8.2 to 1.9.4

Upgrading from 1.8.2 to 1.9.4

johnathanaujohnathanau Posts: 3Questions: 2Answers: 0

Hello,

I am working on a large codebase that extensively uses Datatables. However, it uses 1.8.2. I have decided to upgrade to 1.9 after trying to override the fnStateLoadCallback function.

I now have problems with the same function again in 1.9. However, it appears that pagination state does not get saved. I have used debug outputs in the core code and in fnStateLoad and fnStateSave both when I call the functions and in the core API.

The scenario is:

  1. I first load the page. I change the display length of the table to 25 and type a search key in and change the page to number 3.
  2. I refresh the page. Display length and search key is retained but pagination state is not.

Debug output:
1. So on first page load. I change the display length, etc. All the outputs seem fine and everything is saved and loaded fine.
2. I refresh the page. Load function is called. The object contains the correct parameters for display length, etc. However, it appears that save function is called after this for some reason. The parameters for the object is now incorrect for iDisplayStart as it is set to zero.

Why is saved called again?

I stepped through the core API and I can't seem to see why iDisplayStart is zero...

Would upgrading straight from 1.8.2 to 1.9.4 solve this issue? What should I consider if I upgrade from 1.8.2 to 1.9.4?

Answers

  • allanallan Posts: 61,822Questions: 1Answers: 10,127 Site admin

    Would upgrading straight from 1.8.2 to 1.9.4 solve this issue?

    It should, but I can't say for certain without a test case.

    What should I consider if I upgrade from 1.8.2 to 1.9.4?

    http://datatables.net/upgrade/1.9

    Allan

This discussion has been closed.