Reload table with child rows without flicker
Reload table with child rows without flicker
backseat
Posts: 7Questions: 3Answers: 0
I have a table with some child rows displayed. The table is refreshed periodically via Ajax. The child expansion on the table draw is handled with:
createdRow: function( row, data, dataIndex ) {
if ( showChildRow ) {
table.row(row).child( format(data) ).show();
$(row).addClass( 'shown' );
}
}
The problem is that the row is initially drawn collapsed, and then almost immediately expanded when the above code executes. That causes a flicker in the display.
What's the best technique for avoiding this? Ideally, I want DataTables to know that the child row should be shown before it starts rendering.
Thanks.
This discussion has been closed.
Replies
Because its an entirely new row you are adding, this is probably expected. Can you link to a page showing the issue though?
Allan