How to enable state saving on button click?
How to enable state saving on button click?
huynt553
Posts: 1Questions: 0Answers: 0
To enable state saving, I know you can do
$('#example').DataTable( {
"stateSave": true
} );
But what if I don't want to enable this feature until the user clicks a "Save Filter Settings" button? I have looked through the API for state.save() and state.loaded() but I'm still a little confused how to proceed. I currently have something like
function saveButton() {
var oTable = $('#example').DataTable();
loadTable = oTable.state.save();
}
How do I load this saved table state now?
This discussion has been closed.