Responsive redraw on multiple tables
Responsive redraw on multiple tables
![bek816](https://secure.gravatar.com/avatar/d6d0a615acf4e7d9080c849114e85098/?default=https%3A%2F%2Fvanillicon.com%2Fd6d0a615acf4e7d9080c849114e85098_200.png&rating=g&size=120)
I'm looping through a collection of items that I'm appending to tables. When I'm done, I'm creating all of the DataTables via:
$('table.table').DataTable( { ... });
There are at least ten tables. How can I force a recalc on every one? I know on one, I can do:
DataTable.columns.adjust()
.responsive.recalc();
Should I $.each of the results of the first query?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
This is what I do after all tables have loaded. I had the $.each in there as well and then replaced it with $.fn.dataTable. Columns.adjust is enough if you do this initially because there will not have been a user change of the screen size by then.
Thanks!