search event for global search only
search event for global search only
ryan2johnson9
Posts: 6Questions: 3Answers: 0
I have read https://datatables.net/reference/event/search and this is almost what I want.
I need to clear some column filters when the global search is used.
trouble is that the
oTable.on( 'search.dt', function () {
var api = oTable.api();
console.error( 'Currently applied global search: '+api.search() );
});
is called also when a single column is filtered
a workaround could possibly be to check if the api.search() has changed since last time
but is there a better way?
I might also be able to add my own listener to the global search and empty the column filters on change.
This discussion has been closed.