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:
parent
8f630f46ed
commit
9a462a5fe4
@ -1 +1 @@
|
||||
d0ad32950d732840d44e9d646b50cefaee5d4ab9
|
||||
456f664604b0cea876883f2dbc6c523704368c90
|
||||
|
9
media/js/jquery.dataTables.js
vendored
9
media/js/jquery.dataTables.js
vendored
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user