want to prevent table-search and colum-level-search to be saved in bStateSave
want to prevent table-search and colum-level-search to be saved in bStateSave
alamnaryab
Posts: 4Questions: 3Answers: 0
in DataTables
I have below code working
"bStateSave":true,
"stateSaveParams": function (settings, data) {
data.start = 0;
data.search.search = "";
},
it prevents table-level search to be saved, but I also want to prevent column-level-search
I tried below code but now no data is loading, I am getting error alert
"stateSaveParams": function (settings, data) {
data.start = 0;
data.search.search = "";
$.each(data.columns,function(i,v){
v.search = "";
});
},
getting below error in consle may be some conflict with table-level search property
Uncaught TypeError: String.prototype.search called on null or undefined
at search (<anonymous>)
Answers
fixed this
it was
v.search.serarch
please let me know if there is other optimized soultion