Regarding saveState what is the key for the saved state data?
Regarding saveState what is the key for the saved state data?
JimKnoll
Posts: 10Questions: 3Answers: 0
In other words if reuse urls and reuse tables on the urls with id="table1" id="table2" ... it seems that I mess up my saved states. I assume that the state is saved for each url=bla and table=bla so since these are not different between my different tables I am unable to uniquely identify one state from the other. So what to change??? the table id the table name?
This discussion has been closed.
Answers
did some more work with this... I found the info on local storage... and limits with more than one datatable. In my case I have about 5 data tables on one url... and I re use the url for different things so I think I will need to come up with a good value for the savestate key...
...
"fnStateSave": function (oSettings, oData) {
localStorage.setItem( 'DataTables_'+window.location.pathname+i, JSON.stringify(oData) );},
"fnStateLoad": function (oSettings) {
return JSON.parse( localStorage.getItem('DataTables_'+window.location.pathname+i) );}
where i is a index as i-n for each table as I create the datatables.