If you use the shown.bs.collapse
event, as the Bootstrap documentation says, it will trigger once the animation for the accordion is complete. So yes, you’d get that flicker. You need to use the show.bs.collapse
event, but also with a little delay since it is triggered before the table is visible in the DOM:
$('#accordionExample').on('show.bs.collapse', function(e){ setTimeout(function () { $($.fn.dataTable.tables(true)).DataTable().columns.adjust(); }, 10); });