Button to clear content in Multi Filter input fields
Button to clear content in Multi Filter input fields
JanNL_FR
Posts: 47Questions: 15Answers: 2
Description of problem:
I have a working button to clear the input fields.
The filters are reset but the input fields are not made blank.
Does anyone know a solution?
{
text: 'Clear All Filters',
action: function () {
portfolioTable.search('').columns().search('').draw();
},
enabled: true
}
This question has an accepted answers - jump to answer
Answers
These are column filters? DataTables knows nothing about your
input
elements. Normally you will bind an event listener to them to update the filter as the search changes.If you want to change the
input
, you need to do that as well. Perhaps a trivial:will do? It is impossible to say what the exactly and correct answer should be without a test case though.
Allan
Many thanks Allan,
I have never studied JavaScript (63 years young), but the simple examples from DataTables.net make it easy to quickly create an example.
I have an example at https://campcare.eu/1/Details/
Thanks for the whole team of DataTables, CloudTables and Editor.
Keep up the good work!!