How to reset/clear selections from a specific searchpane filter manually using jQuery Datatables
How to reset/clear selections from a specific searchpane filter manually using jQuery Datatables

I want to clear selection from a specific searchpane filters created using jQuery datatable manually using code. How to acheive this.
I'm aware that to clear all selections we use : $('#example').DataTable().searchPanes.clearSelections()
but not sure if i want to clear a single filter's selections.
Answers
Using standard jQuery, you could click the 'x' button
Please see example here,
Colin
jQuery('.dtsp-searchPane').each(function (index, elemnt) {
if (index > 0) {
const selectedClearButton = jQuery(elemnt).find('.clearButton');
selectedClearButton.click();
}
});
I want to reset all the filters together except the 1st one using above code. but I observed only first filter gets reset, others remains as it is.
Please assist how to manually reset the filters as many as we want.