add a button to clear search field
add a button to clear search field
bjh27
Posts: 3Questions: 2Answers: 0
Is there a way to add a button next to the search filed that would clear the search field when clicked?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
You can use the buttons API to listen for a click event and use jQuery in coordination to select the input in the search field and set it to an empty string when clicked
The documentation for creating a custom button is available here. In this case you could use
search()
to clear the main search for the table - e.g.:Allan
Thanks!