Clearing YADCF Filters On Load
Clearing YADCF Filters On Load
mRender
Posts: 151Questions: 26Answers: 13
"stateSave": true,
.....
yadcf.init(oTable, [
{
column_number: 0
}, {
column_number: 1
}, {
column_number: 2
}, {
column_number: 3
},
.....
Is there a way to use State Saving to clear the YADCF filters when the page loads, but keep all other sorting and stuff that has been done to the table? Everything I put into the state save parameters or yadcf parameters don't seem to work together to clear the filters of the yadcf.
This discussion has been closed.
Answers
You should try using the searchCols , set the columns filter to be an empty string and see how it goes for you
Did not work, I suspect it's because the searchCols refers to the individual search parameters of the datatables searching and not the yadcf search boxes.
Thanks for trying.
This works. There was an issue where you had to add an extra bracket around each column but that bug has been fixed. You can use this function to basically pre-search on all the columns.