saveState option

saveState option

LmaltLmalt Posts: 2Questions: 1Answers: 0

Hello,

I want to be able to get back previous parameters after actualizing the page of getting to a subpage. I tried this:

$('.table-triable').DataTable({
"saveState" : true,
"stateDuration" : -1,
"language" : { (....) }});

Although not documented explicitly, I was assuming that nothing else was necessary, but it does not work: language options are effective, but the saveState option has no visible effect.

Is it necessary to add something in order to restore the state when the page is reloaded?

Thanks in advance

Answers

  • allanallan Posts: 63,761Questions: 1Answers: 10,510 Site admin

    That looks like all that should be needed. Can you link to the page showing the issue so we can take a look at what is going wrong please.

    Allan

  • LmaltLmalt Posts: 2Questions: 1Answers: 0

    Thank you. When I test locally on my computer (outside the Symfony environment) the example provided by the site, it works perfectly. When I use the same configuration in the $(document).ready() section on my Symfony application and I apply the standard Symfony procedure about Javascript changes, everything works except the saveState option. It might be a Symfony question. Nonetheless, if somebody has an idea... (I cannot link to the application, it's not accessible through Internet)

  • sahilshah50sahilshah50 Posts: 1Questions: 0Answers: 0

    Try stateSave: true instead of "saveState" : true

This discussion has been closed.