bstate:true and column select filter
bstate:true and column select filter
hi, use bstate:true and select filter.
var oTable = $('#table-example').dataTable( {
sPaginationType: "full_numbers",
"bStateSave": true,
"fnStateSave": function (oSettings, oData) {
localStorage.setItem( 'DataTables', JSON.stringify(oData) );
},
"fnStateLoad": function (oSettings) {
return JSON.parse( localStorage.getItem('DataTables') );
},
"aoColumns": [
null,
null,
null
]
} ).columnFilter({
sRangeFormat: "{from} {to}",
aoColumns: [
{ type: "text"},
{ type: "select",values: ['new','old','delete']},
{ type: "date-range"}
]
});
});
when I refresh the page:
text filter = value text filter - GOOD
select filter = select option empty, but filtr search GOOD
date-range filter = empty and filtr search NOT GOOD
how can I select option in my column filter after refresh page?
Replies
You can use my yadcf plugin, or dig through its code to see how I did it
See it in action and hit refresh whenever you want