Reset search on DataTable with stateSave turned on
Reset search on DataTable with stateSave turned on
Nothing I have tried works. I have tried every solution I can find on the internet, both in the DataTables forum and in Stack Exchange. I have version 1.10.15. I've tried the APIs. I've tried the solution such as is seen at https://datatables.net//forums/discussion/31375. This throws an error that search is not a function.
I have tried turning off stateSave, clearing, and turning it back on. With some solutions I can see the input text box clear for a millisecond before the value comes back. What does it take to make this thing reset?
Answers
That example should work. But you may need to change it to something like this:
If you are using ajax the variable
table
or whatever you are using is likely not containing the Datatable API when the code to clear the searches is executed.Kevin
See this FAQ.
Allan