SearchPanes "Clear All" button to also clear search box?

SearchPanes "Clear All" button to also clear search box?

Nick HopeNick Hope Posts: 48Questions: 12Answers: 1

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

  • colincolin Posts: 15,177Questions: 1Answers: 2,590
    Answer ✓

    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

  • Nick HopeNick Hope Posts: 48Questions: 12Answers: 1

    Thank you Colin. That works perfectly :)

Sign In or Register to comment.