Some issues with State Saving / Loading

Some issues with State Saving / Loading

John ArcherJohn Archer Posts: 56Questions: 1Answers: 0
edited February 2012 in DataTables 1.9
Hi Allan,

three things/issues/questions about this topic:
1. I think there is a typo in documentation of fnStateSaveParams: In the example it surely should be "fnStateSaveParams" and not "fnStateLoadParams".

2. When using fnStateLoadParams I want to alter some settings. E.g. I always want to start on the first page, which means I don't want use the saved pagination state. So I set
[code]oData.iStart = 0;[/code]
When I console.log oData I can see that it so correctly set to 0, but the datatable seems not to use it as it is sill on page 4, e.g.

EDIT: Sure, I could alter iStart already when I save, but it should also work while loading, shouldn't it?

3. In the documentation I see that you use oData.oFilter, but here oFilter is not defined. Instead I have to use oData.oSearch. Error in the docs or in DataTable source code? :-)

Thanks a lot in advance!

Regards

Replies

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin
    1. Good point! I've just committed the fix. The documentation it tied to the releases of DataTables now, so the fix will be deployed with 1.9.1.

    2. That should work and it appears to do so for me when I try it here: http://live.datatables.net/otecet/edit#source

    3. Urgh - documentation is wrong I'm afraid. It should be oSearch not oFilter...

    Allan
  • John ArcherJohn Archer Posts: 56Questions: 1Answers: 0
    1. Thanks!

    2. Argh, my fault, sorry ... :-(

    3. :-)
This discussion has been closed.