Hi! recently I discovered that my filtering function was not working anymore for some columns.
My current version is 1.10.4
After searching the forum, what I could understand is that the aData parameter of the afnFiltering function contains the cells' text of the row. In previous versions of DataTables it appears that aData used to contain the HTML content of the cells.
Wich actually is quite a problem because one might have many renders that display HTML, for instance :
render: function(data, type, full)
{
if(data=='0') return '<img src="pix/no.png" />';
else if(data=='1') return '<img src="pix/yes.png" />';
return '-';
}
$.fn.dataTableExt.afnFiltering.push(
function( oSettings, aData, iDataIndex ) {
console.log(aData);
}
);
In previous versions of DataTables, the console output of aData would clearly show the <img> tags,
while now I just get an empty string (obviously the <img> tag contains no text)
Then, how is it possible to filter such cells using aData, without having to query the data() of that cell in the filtering function (wich would use dramatically more CPU) ?