How to close/remove all opened child rows on table resize ?
How to close/remove all opened child rows on table resize ?
vv7v7
Posts: 9Questions: 3Answers: 0
Dear Reader,
Is it possible to close/remove all opened child rows in all tables and how ?
This one doesn't work:
table_api.on( 'responsive-resize', function ( e, datatable, columns ) {
$( "#" + e.target.id + " tbody tr.opened" ).each( function ( index, value ) {
var op_row = table_api.row( value );
if ( op_row.child.isShown( ) ) op_row.child.remove( );
op_row.removeClass( 'opened' );
});
});
Btw tables are generated like this
Best regards,
vv7v7
This discussion has been closed.
Answers
I'd be tempted to try activating the
click
event on the element rather than using the API directly for this one.perhaps?
Allan