Have a button to clear all data
Have a button to clear all data
Link to test case: https://live.datatables.net/cuqikapa/1/edit
Debugger code (debug.datatables.net): N/A
Error messages shown: N/A
Description of problem:
Hello,
I have created a table with filters below each column. These filters can be cleared using the “Clear 2” button in my test case.
I have also added the “ColumnControl” extension to enable filtering. Those filters can be cleared using the “Clear 1” button in my test case.
I would like to have a single button that clears all these filters at once. Is that possible?
Kind regard,
Anthony
Answers
Sorry I wanted to delete this message but I cant't.
Did you want to delete the whole thread, or just the follow up?
Since you are already loading ColumnControl, have you considered using ColumnControl to provide the footer input filters?
Allan
No I just wanted to delete my second message, not the first one
Yes, I did consider that solution, but I would prefer to use the classic filter, because I apply some regular expressions to it.
If there is no possible solution to this clearing problem, I will probably opt for this solution.
One option might be to use
button().trigger()to trigger theccSearchClearbutton. Updated test case:https://live.datatables.net/cuqikapa/3/edit
Optionally you can add a
buttons.buttons.classNameto theccSearchClearto hide the button. See the CSS tab of the updated test case.Kevin