Keep state save along whole session

Keep state save along whole session

andreagrecoandreagreco Posts: 2Questions: 1Answers: 0

Hi,
I've implemented DataTables and set 'bStateSave': true

I've noticed the state is preserved correctly when I refresh the page or hit the back button but, if I browse to another page and then use a link to return to the page containing DataTables, the state is cleared.

I suppose this is intended but I need to preserve the state for the whole session. There is a way to do so?

P.S. Sorry for my bad english....

Answers

  • colincolin Posts: 15,144Questions: 1Answers: 2,586

    Hi @andreagreco ,

    The state should always be preserved, so something sounds wonky - is the URL changing when you go back to the page? We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • andreagrecoandreagreco Posts: 2Questions: 1Answers: 0

    Thank you @colin
    I really tought it was some kind of intended behaviour....

    Unfortunatly I can't post a working link and the system is not so easy to replicate on codepen or similar due to the routing system wich, now, I think is related to the problem.

    I'll try a more deep debug and, if i can, I will try to make a test case.

  • allanallan Posts: 61,723Questions: 1Answers: 10,108 Site admin

    Our example page for state saving doesn't appear to exhibit the behaviour you mention.

    The only thing I can think of would be that you might have set the state duration and its timed out? Beyond that though, we'd need a test case as Colin said.

    Allan

This discussion has been closed.