The problem with the stateDuration parameter

The problem with the stateDuration parameter

ahzzaxzhyo7wahzzaxzhyo7w Posts: 5Questions: 1Answers: 0
edited July 2020 in Free community support

Hello! When initializing the table, I specify the stateDuration parameter for 60 seconds, and logically, the table should not change its state within 60 seconds.
But in reality, the state stored in LocalStorage changes every time the table is initialized. Is it correct?

Replies

  • allanallan Posts: 63,213Questions: 1Answers: 10,415 Site admin

    stateDuration is how long the state is valid for from that last time DataTables saves the state. If you reload the table within that window then the state will be restored. If you reload the table outside that window, the state will not be restored.

    Yes, I would expect the state to be saved when the table is first initialised (each draw triggers a state change).

    Allan

This discussion has been closed.