Table Refresh after Column filter notworking after upgrade 1.10.11
Table Refresh after Column filter notworking after upgrade 1.10.11
Hello All, I have Facet Filter for columns and after going through various forums try fnFilterClear API but some how its not refreshing table after i close my filter, previous version code 1.9.4. below is the code unfortunately not able to share link.
if(oTopParent.hasClass("ulFlags")){
oActiveFilters.find('ul').append('<li class=" ' + oText.toLowerCase() +' "> <span class="closeButton"><span><a href="#">' + oText + '</a></span></span></li>');
} else {
oActiveFilters.find('ul').append('<li class=" ' + oTopParent.attr("class") + ' ") <span class="closeButton"><span><a href="#"> +oText +'</a></span></span></li>');
oActiveFilters.find('li').removeClass('has-hub active last');
}
});
So with the old version, when i click the close button in 'li' filter , It refresh the table and draw the table to it's original and then i can hide the facet filter using toggle.
/* Filter by Column code */
oLink.click(function(){
var oThis = $(this);,
oTopParent = oThis.parent().parent(),
oText = oThis.find('div').text();
if ($(oTopParent).hasClass('Honda')) {
// dataTable1.fnFilter(oText,4); This was my old code for 1.9.4 replace with following line.
dataTable1.column(4).search("^" + oText + "$" , true).draw();
}
});
I tried different ways as per new Table documentation but not able to fix this . Any help will be great. Thanks for taking your time looking into this Appreciated.