I\'ve posted this in the datatables.net forums, but after a week, still no response. Hopefully I can find help here...
I\'m using datatables version 1.8.1 and am ha
I found that the width would misalign in the first window scroll, so the solution is to, on the first scroll only request a new table draw.
const $table = $('#table').DataTable({ ... });
$(window).on('scroll', () => {
$(window).off('scroll');
$table.tables().draw();
});
Edit: Also works with a setTimeout function. This depends when the misaligning happens.
$table.tables().draw() is the key here.