stateSave: true and the callbacks -- can't seem to change table options "later"
stateSave: true and the callbacks -- can't seem to change table options "later"
So, simple.
I make a table, with 6 columns.
I visit that web page, and it puts an entry into local storage.
I then go to my javascript and add:
"columnDefs": [{
"targets": [1],
"visible": false
}],
I go back to my page and re-render the table, and the column isn't hidden (since it wasn't before).
Or in reverse, same page.. I clear out my local storage and I have the above.
I visit the page, the column is hidden.
I comment out that code.
Refresh the page -- column is still hidden
;)
Like -- since I can't reliably clear out a users local storage, how is this supposed to work ;)
Answers
the cookie has a lifespan, you could maybe do something with that..?
also there is code that when run it deletes the cookie, oTable.state.clear();
Ahh, the 2nd thing.. oTable.state.clear() will totally do it. thanks!