I had the same issue with the version of Firefox and Firefox. The main reason is that when we set scrollX:true , the datatable adds an extra div with the table and title inside, except for the table and title already built. This is done to scroll through the effect of the table.
Datatable, trying to set the height to 0px to hide it. Some browsers do not interpret this correctly.
<tr style="height: 0px;" role="row">
To hide it, changing the style from this line to “hidden” will violate the structure of the table. A working solution would be to have visibility:'collapse'
Data configuration example:
tableElement.DataTable({ "scrollX": true, "initComplete": function(settings, json) { $('.dataTables_scrollBody thead tr').css({visibility:'collapse'}); }
since this is a table, we need visibility: “collapse”, not visibility: “hidden” - more information about the visibility css property
source share