1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-11-29 11:24:10 +01:00

Api - columns: Corrections found durating documentation:

- columns().cache() should check for the parameter 'search' for naming
  consistency

- Plural error on column().nodes()

- Change column.index() fromIndex/toIndex to fromData/toData - its an
  index be it data or visible, so the old method was meaningless
This commit is contained in:
Allan Jardine 2013-11-14 17:08:24 +00:00
parent debea960c6
commit 48931bbb18
2 changed files with 5 additions and 5 deletions

View File

@ -1 +1 @@
48e7986fbdcf57964ca3f42942113186d418b772 5afd517bf01c3372e18727c3c2d845d8b984a581

View File

@ -7783,13 +7783,13 @@
_api_registerPlural( 'columns().cache()', 'column().cache()', function ( type ) { _api_registerPlural( 'columns().cache()', 'column().cache()', function ( type ) {
return this.iterator( 'column-rows', function ( settings, column, i, j, rows ) { return this.iterator( 'column-rows', function ( settings, column, i, j, rows ) {
return _pluck_order( settings.aoData, rows, return _pluck_order( settings.aoData, rows,
type === 'filter' ? '_aFilterData' : '_aSortData', column type === 'search' ? '_aFilterData' : '_aSortData', column
); );
} ); } );
} ); } );
_api_registerPlural( 'columns().nodes()', 'columns().nodes()', function () { _api_registerPlural( 'columns().nodes()', 'column().nodes()', function () {
return this.iterator( 'column-rows', function ( settings, column, i, j, rows ) { return this.iterator( 'column-rows', function ( settings, column, i, j, rows ) {
return _pluck_order( settings.aoData, rows, 'anCells', column ) ; return _pluck_order( settings.aoData, rows, 'anCells', column ) ;
} ); } );
@ -7839,10 +7839,10 @@
if ( this.context.length !== 0 ) { if ( this.context.length !== 0 ) {
var ctx = this.context[0]; var ctx = this.context[0];
if ( type === 'fromVisible' || type === 'toIndex' ) { if ( type === 'fromVisible' || type === 'toData' ) {
return _fnColumnIndexToVisible( ctx, idx ); return _fnColumnIndexToVisible( ctx, idx );
} }
else if ( type === 'fromIndex' || type === 'toVisible' ) { else if ( type === 'fromData' || type === 'toVisible' ) {
return _fnVisibleToColumnIndex( ctx, idx ); return _fnVisibleToColumnIndex( ctx, idx );
} }
} }