Table header width not calculated properly if table is not overflowing horizontally
Table header width not calculated properly if table is not overflowing horizontally
Hi there, I'm having an issue with my datatable where the table headers' widths are not being calculated properly when the table is not overflowing horizontally.
The table is set to 100% the width of the page- but when it's not overflowing the headers don't line up with the column cells.
I can't provide a test case in a reasonable time frame so more so probing for anybody who may have some quick suggestions or insights on this particular behavior.
Here are the options being used for the table if it's of any use:
this.datatableOptions = {
dom: "Blrtip", // https://datatables.net/reference/option/dom
deferLoading: true,
processing: true,
serverSide: true,
select: true,
paging: true,
paginate: true,
pageLength: 100,
lengthChange: true,
scrollX: true,
scrollY: window.innerHeight - 200,
scrollCollapse: true,
autoWidth: false,
colReorder: true,
lengthMenu: [25, 50, 100, 300, 500, 1000],
};
Any thoughts are appreciated, thank you!
Answers
Yeah, we'll need that test case, please, or just a link to your site even. These things are hard to debug without seeing the issue.
Colin
Make sure you have all the correct Datatables style integration files for the styling framework you are using. Use the Download Builder to get the correct files. If this doesn't help then please post the test case Colin asked for.
Kevin