mirror of
https://github.com/DataTables/DataTables.git
synced 2024-12-12 00:08:48 +01:00
Fix: Made a mistake when updating the conditionals for fnFilter and fnGetData when considering rows. if ( 0 ) is of course false - so passing in an integer isn't valid - need to check for undefined - 7997
This commit is contained in:
parent
7ba7027ee8
commit
2f729af697
8
media/js/jquery.dataTables.js
vendored
8
media/js/jquery.dataTables.js
vendored
@ -4920,7 +4920,7 @@
|
|||||||
|
|
||||||
oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
|
oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
|
||||||
|
|
||||||
if ( bRedraw )
|
if ( bRedraw === undefined || bRedraw )
|
||||||
{
|
{
|
||||||
_fnReDraw( oSettings );
|
_fnReDraw( oSettings );
|
||||||
}
|
}
|
||||||
@ -5300,7 +5300,7 @@
|
|||||||
bCaseInsensitive = true;
|
bCaseInsensitive = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !iColumn )
|
if ( iColumn === undefined || iColumn === null )
|
||||||
{
|
{
|
||||||
/* Global filter */
|
/* Global filter */
|
||||||
_fnFilterComplete( oSettings, {
|
_fnFilterComplete( oSettings, {
|
||||||
@ -5370,7 +5370,7 @@
|
|||||||
var iRow = (typeof mRow === 'object') ?
|
var iRow = (typeof mRow === 'object') ?
|
||||||
_fnNodeToDataIndex(oSettings, mRow) : mRow;
|
_fnNodeToDataIndex(oSettings, mRow) : mRow;
|
||||||
|
|
||||||
if ( iCol )
|
if ( iCol !== undefined )
|
||||||
{
|
{
|
||||||
return _fnGetCellData( oSettings, iRow, iCol, '' );
|
return _fnGetCellData( oSettings, iRow, iCol, '' );
|
||||||
}
|
}
|
||||||
@ -5400,7 +5400,7 @@
|
|||||||
{
|
{
|
||||||
var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
|
var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
|
||||||
|
|
||||||
return (iRow) ?
|
return (iRow !== undefined) ?
|
||||||
oSettings.aoData[iRow].nTr :
|
oSettings.aoData[iRow].nTr :
|
||||||
_fnGetTrNodes( oSettings );
|
_fnGetTrNodes( oSettings );
|
||||||
};
|
};
|
||||||
|
@ -561,7 +561,7 @@ this.fnFilter = function( sInput, iColumn, bRegex, bSmart, bShowGlobal, bCaseIns
|
|||||||
bCaseInsensitive = true;
|
bCaseInsensitive = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !iColumn )
|
if ( iColumn === undefined || iColumn === null )
|
||||||
{
|
{
|
||||||
/* Global filter */
|
/* Global filter */
|
||||||
_fnFilterComplete( oSettings, {
|
_fnFilterComplete( oSettings, {
|
||||||
@ -631,7 +631,7 @@ this.fnGetData = function( mRow, iCol )
|
|||||||
var iRow = (typeof mRow === 'object') ?
|
var iRow = (typeof mRow === 'object') ?
|
||||||
_fnNodeToDataIndex(oSettings, mRow) : mRow;
|
_fnNodeToDataIndex(oSettings, mRow) : mRow;
|
||||||
|
|
||||||
if ( iCol )
|
if ( iCol !== undefined )
|
||||||
{
|
{
|
||||||
return _fnGetCellData( oSettings, iRow, iCol, '' );
|
return _fnGetCellData( oSettings, iRow, iCol, '' );
|
||||||
}
|
}
|
||||||
@ -661,7 +661,7 @@ this.fnGetNodes = function( iRow )
|
|||||||
{
|
{
|
||||||
var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
|
var oSettings = _fnSettingsFromNode( this[DataTable.ext.iApiIndex] );
|
||||||
|
|
||||||
return (iRow) ?
|
return (iRow !== undefined) ?
|
||||||
oSettings.aoData[iRow].nTr :
|
oSettings.aoData[iRow].nTr :
|
||||||
_fnGetTrNodes( oSettings );
|
_fnGetTrNodes( oSettings );
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user