1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-01-30 23:52:11 +01:00

Dev fix: Child row appending was broken due to need to use .dt namespace

This commit is contained in:
Allan Jardine 2014-01-21 08:19:39 +00:00
parent 8f630f46ed
commit 9a462a5fe4
2 changed files with 6 additions and 5 deletions

View File

@ -1 +1 @@
d0ad32950d732840d44e9d646b50cefaee5d4ab9
456f664604b0cea876883f2dbc6c523704368c90

View File

@ -7674,13 +7674,14 @@
var __details_events = function ( settings )
{
var table = $(settings.nTable);
var namespace = '.dt.DT_details';
table.off('draw.DT_details');
table.off('column-visibility.DT_details');
table.off('draw'+namespace);
table.off('column-visibility'+namespace);
if ( _pluck( settings.aoData, '_details' ).length > 0 ) {
// On each draw, insert the required elements into the document
table.on('draw.DT_details', function () {
table.on('draw'+namespace, function () {
table.find('tbody tr').each( function () {
// Look up the row index for each row and append open row
var rowIdx = _fnNodeToDataIndex( settings, this );
@ -7693,7 +7694,7 @@
} );
// Column visibility change - update the colspan
table.on( 'column-visibility.DT_details', function ( e, settings, idx, vis ) {
table.on( 'column-visibility'+namespace, function ( e, settings, idx, vis ) {
// Update the colspan for the details rows (note, only if it already has
// a colspan)
var row, visible = _fnVisbleColumns( settings );