SearchPanes "Clear All" button to also clear search box?
SearchPanes "Clear All" button to also clear search box?
Nick Hope
Posts: 48Questions: 12Answers: 1
in SearchPanes
Is there a way to make the SearchPanes "Clear All" button also clear the regular search filter box?
A test case would be my page at https://fplform.com/fpl-predicted-points
I assume I would have to get the "Clear All" button to run a function, which would run something like this:
$('#players').DataTable().searchPanes.clearSelections();
table.search('').draw();
This question has an accepted answers - jump to answer
Answers
You can do something like this here, it's enabling the clear when a search is also present. It doesn't need additional code for the clearing of the panes, as that'll happen automatically.
Colin
Thank you Colin. That works perfectly