Filtering combined with custom sort function (dataTableExt.afnSortData) removes valid rows from tabl
Filtering combined with custom sort function (dataTableExt.afnSortData) removes valid rows from tabl
fbascheper
Posts: 1Questions: 0Answers: 0
I am using a custom sort function ($.fn.dataTableExt.afnSortData), which works fine by itself. E.g. the sort function returns a date in the form 20140428, where the table itself shows dates in a formatted layout, such as April 28th, 2014; optionally including html.
I can correctly sort on the column and I can correctly filter on the date by entering "April" in the search field.
However, if I combine these actions by
* Entering April in the search field (this correctly filters out the other rows)
* Then sorting on the date column
And then I see that the results of "April" are filtered out from the result.
Is it possible that this is caused by _fnSetCellData in line 3960-3976 in jquery-dataTables-1.9.4 where the data is updated by _fnSetCellData?
[code]
if ( DataTable.ext.afnSortData[sDataType] )
{
var aData = DataTable.ext.afnSortData[sDataType].call(
oSettings.oInstance, oSettings, iColumn, iVisColumn
);
if ( aData.length === aoData.length )
{
for ( j=0, jLen=aoData.length ; j
I can correctly sort on the column and I can correctly filter on the date by entering "April" in the search field.
However, if I combine these actions by
* Entering April in the search field (this correctly filters out the other rows)
* Then sorting on the date column
And then I see that the results of "April" are filtered out from the result.
Is it possible that this is caused by _fnSetCellData in line 3960-3976 in jquery-dataTables-1.9.4 where the data is updated by _fnSetCellData?
[code]
if ( DataTable.ext.afnSortData[sDataType] )
{
var aData = DataTable.ext.afnSortData[sDataType].call(
oSettings.oInstance, oSettings, iColumn, iVisColumn
);
if ( aData.length === aoData.length )
{
for ( j=0, jLen=aoData.length ; j
This discussion has been closed.