Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix: afnSortData functions were not being executed with the DataTable…

…s instance's scope
  • Loading branch information...
commit 2096244c60e1804845bd2d01f93fb02447c10622 1 parent b5f4938
Allan Jardine authored
Showing with 6 additions and 2 deletions.
  1. +3 −1 media/js/jquery.dataTables.js
  2. +3 −1 media/src/core/core.sort.js
4 media/js/jquery.dataTables.js
View
@@ -3796,7 +3796,9 @@
sDataType = oSettings.aoColumns[ iColumn ].sSortDataType;
if ( DataTable.ext.afnSortData[sDataType] )
{
- var aData = DataTable.ext.afnSortData[sDataType]( oSettings, iColumn, iVisColumn );
+ var aData = DataTable.ext.afnSortData[sDataType].call(
+ oSettings.oInstance, oSettings, iColumn, iVisColumn
+ );
if ( aData.length === aoData.length )
{
for ( j=0, jLen=aoData.length ; j<jLen ; j++ )
4 media/src/core/core.sort.js
View
@@ -36,7 +36,9 @@ function _fnSort ( oSettings, bApplyClasses )
sDataType = oSettings.aoColumns[ iColumn ].sSortDataType;
if ( DataTable.ext.afnSortData[sDataType] )
{
- var aData = DataTable.ext.afnSortData[sDataType]( oSettings, iColumn, iVisColumn );
+ var aData = DataTable.ext.afnSortData[sDataType].call(
+ oSettings.oInstance, oSettings, iColumn, iVisColumn
+ );
if ( aData.length === aoData.length )
{
for ( j=0, jLen=aoData.length ; j<jLen ; j++ )
Please sign in to comment.
Something went wrong with that request. Please try again.