Custom column search and Column Visibility

Custom column search and Column Visibility

cmagnancmagnan Posts: 1Questions: 1Answers: 0

Hi! I tested all the codes I found on the website to create custom column filters like the interval filter, the text filter, the date filter, on so on, both using extra search methods added to $.fn.dataTable.ext.search or by using the column().search() method and everything is working great, even when many of them are used together, so that's really great, I love it. After adding the column visibility button from the Buttons extension, everything is still working great BUT as soon as one column is hidden by the extension, regardless of which column, none of the custom filters work anymore beside the default table search created by Datatable(). After checking in more details, the problem is not in the column indexes and the custom events I added to the filters (like keyup) are still present on the DOM elements but for whatever reason, they no longer work. The problem happens on any kind of custom filter and on any column, it looks like as soon as I hide a column using the column visibility button, the table cannot be filtered or redrawn using these custom filters. Any idea what could be the problem? The code I use is too long to be pasted here but the problem can be reproduced using the code here : https://datatables.net/examples/plug-ins/range_filtering.html adding only the colvis button at initialization time. Thank you

This discussion has been closed.