mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Formatter: detach tbody before processing
This commit is contained in:
parent
6962d31302
commit
1b91228cdc
@ -20,10 +20,11 @@
|
|||||||
setup : function( c ) {
|
setup : function( c ) {
|
||||||
// do nothing for empty tables
|
// do nothing for empty tables
|
||||||
if ( $.isEmptyObject( c.cache ) ) { return; }
|
if ( $.isEmptyObject( c.cache ) ) { return; }
|
||||||
var tbodyIndex, rowIndex, rows, len, column, formatter,
|
var $tbody, tbodyIndex, rowIndex, rows, len, column, formatter,
|
||||||
wo = c.widgetOptions,
|
wo = c.widgetOptions,
|
||||||
data = { config: c, wo: wo };
|
data = { config: c, wo: wo };
|
||||||
for ( tbodyIndex = 0; tbodyIndex < c.$tbodies.length; tbodyIndex++ ){
|
for ( tbodyIndex = 0; tbodyIndex < c.$tbodies.length; tbodyIndex++ ){
|
||||||
|
$tbody = ts.processTbody( c.table, c.$tbodies.eq( tbodyIndex ), true ); // detach tbody
|
||||||
rows = c.cache[ tbodyIndex ];
|
rows = c.cache[ tbodyIndex ];
|
||||||
len = rows.normalized.length;
|
len = rows.normalized.length;
|
||||||
for ( rowIndex = 0; rowIndex < len; rowIndex++ ) {
|
for ( rowIndex = 0; rowIndex < len; rowIndex++ ) {
|
||||||
@ -40,6 +41,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ts.processTbody( c.table, $tbody, false); // restore tbody
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user