Best way to do a mass show child
Best way to do a mass show child

i am looking for the best way to do a mass show child
currently i have
datatable.rows([ids]).nodes().to$().each((index,tr) => {
let row = datatable.row( tr );
row.child( "<label>NOT THE MOMMA</label>" );
row.child.show();
$(tr).addClass('shown');
})
it seems like the table is redrawn each time (guessing from .show())
with a table of 2000+ rows (no paging) draws can get pricey.
Just wondering if there is a way to 'que' up the child shows so i don't have 2000+ redraws, kinda like how add row 'ques' up new rows and waits for the .draw() to visually add them
This discussion has been closed.
Answers
Here's how I did it (not saying it's the best way):
Note, my child row text is placed in a data-child-note attribute in the table rows.
<tr data-child-note="Hello World">
There is a defect in the every function call that only processes the first table (if you have more than one table).
If that applies to you, check out the details here: https://datatables.net/forums/discussion/57813/problem-with-multi-table-initialization#latest