Saving DataTables' state (length, filtering, page) in cookie
-
Hello,
first of all, thanks for this great plugin!
There is a DataTable option called
bStateSave
which enables to save the state of a table (length, filtering, page) in a cookie [1]. This is particularly useful when a user returns back to a table after following an outgoing link in a table cell. WhenbStateSave
is off, the returning user will end up seeing the default view of the table, first page, 10 items per page, no filtering or sorting. WhenbStateSave
is on, the user will see the same page, ordering and pagination length as seen before leaving the page. This option is off by default.To enable this option, I have changed
bStateSave:!1
tobStateSave:!0
in my jquery.datatables.min.js.It would be great to have this very nice DataTable option in the options page of TablePress too!
Can this be done using the “Custom Commands” textfield? If yes, how would I have to write this?
[1] https://datatables.net/examples/basic_init/state_save.html
Thanks and kind regards,
claus
- The topic ‘Saving DataTables' state (length, filtering, page) in cookie’ is closed to new replies.