bStateSave not sending cookie.
bStateSave not sending cookie.
victorkurauchi
Posts: 12Questions: 1Answers: 0
Hi everyone.
I'm having a problem with the bStateSave property in DataTables 1.9.
The attribute is enable (true) but when i filter some data and go to another page, when i return the filter isn't there anymore.
[code]
$('.example').dataTable({
"bPaginate": true,
"bRetrieve": true,
"bDestroy": true,
"bSortClasses": false,
"bStateSave": true,
"iCookieDuration": 3600,
"sPaginationType": "full_numbers"
});
[/code]
Using Chrome, I verified the page information (right-click button) and the cookie wasn't set.
Need support, thank you all.
I'm having a problem with the bStateSave property in DataTables 1.9.
The attribute is enable (true) but when i filter some data and go to another page, when i return the filter isn't there anymore.
[code]
$('.example').dataTable({
"bPaginate": true,
"bRetrieve": true,
"bDestroy": true,
"bSortClasses": false,
"bStateSave": true,
"iCookieDuration": 3600,
"sPaginationType": "full_numbers"
});
[/code]
Using Chrome, I verified the page information (right-click button) and the cookie wasn't set.
Need support, thank you all.
This discussion has been closed.
Replies
Also don't use both bRetrieve and bDestroy - they are mutually exclusive and cannot be used together.
First time reading the usage, I thought that bDestroy and bRetrieve supposed to use together. My bad.
Which one should I remove ?
Probably the problem was on the class selector (in the same view, i have two datatables.)
Solution: The most important table have an ID now, then i'm rendering by it.
[code]
// Datatable
$('.example').dataTable({
"bPaginate": true,
"bRetrieve": true,
"bDestroy": true,
"bSortClasses": false,
"bStateSave": false,
"sPaginationType": "full_numbers"
});
// Datatable
$('#datatable-worklist').dataTable({
"bPaginate": true,
"bStateSave": true
});
[/code]