mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Core: fix cache debug log for multiple tbodies
This commit is contained in:
parent
9adc837253
commit
d196092339
@ -942,16 +942,17 @@
|
|||||||
ts.isProcessing( table ); // remove processing icon
|
ts.isProcessing( table ); // remove processing icon
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( c.debug ) {
|
||||||
len = Math.min( 5, c.totalRows );
|
len = Math.min( 5, c.cache[ 0 ].normalized.length );
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Building cache for ' + totalRows +
|
console[ console.group ? 'group' : 'log' ]( 'Building cache for ' + c.totalRows +
|
||||||
' rows (showing ' + len + ' rows)' + ts.benchmark( cacheTime ) );
|
' rows (showing ' + len + ' rows in log)' + ts.benchmark( cacheTime ) );
|
||||||
val = {};
|
val = {};
|
||||||
for ( colIndex = 0; colIndex < c.columns; colIndex++ ) {
|
for ( colIndex = 0; colIndex < c.columns; colIndex++ ) {
|
||||||
for ( cacheIndex = 0; cacheIndex < len; cacheIndex++ ) {
|
for ( cacheIndex = 0; cacheIndex < len; cacheIndex++ ) {
|
||||||
if ( !val[ 'row: ' + cacheIndex ] ) {
|
if ( !val[ 'row: ' + cacheIndex ] ) {
|
||||||
val[ 'row: ' + cacheIndex ] = {};
|
val[ 'row: ' + cacheIndex ] = {};
|
||||||
}
|
}
|
||||||
val[ 'row: ' + cacheIndex ][ c.headerContent[ colIndex ] ] = cache.normalized[ cacheIndex ][ colIndex ];
|
val[ 'row: ' + cacheIndex ][ c.headerContent[ colIndex ] ] =
|
||||||
|
c.cache[ 0 ].normalized[ cacheIndex ][ colIndex ];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console[ console.table ? 'table' : 'log' ]( val );
|
console[ console.table ? 'table' : 'log' ]( val );
|
||||||
|
Loading…
Reference in New Issue
Block a user