After hiding a column table responsiveness no longer functions on window resize
After hiding a column table responsiveness no longer functions on window resize

when using the default datatables call: $('#example').DataTable(); everything works just fine. If I add the option to hide the first column via this:
$('#example').DataTable({
"columnDefs": [
{
"targets": [ 0 ],
"visible": false,
"searchable": false
}
]
});
the responsiveness of the table disappears. It takes a screen refresh to have the table redraw to the size of the window. What am I doing wrong/forgetting here? I am looking to hide the first column but maintain the responsiveness on window resize.
Replies
Could be lots of things but maybe you need to use
responsive.recalc()
after resizing the window.Maybe you need to add
style="width:100%"
to yourtable
tag to allow Datatables to calculate the table width.If this doesn't help then we will likely need to see a link to your page or a test case replicating the issue. This way we can see exactly what you have to offer suggestions.
Kevin