dataTables are not resizing properly when changing window size larger
dataTables are not resizing properly when changing window size larger
In my web page I have a navigation tab bar with two tabs. Each tab has a separate data table. When I initially load the page the scroll X bar at bottom doesn't appear in either data table in either tab. When I resize the window smaller the scroll x bar appears. If I refresh the page from the smaller window size the scroll bar goes away. From there, if I increase the window size the table won't resize to fit the larger window. It thinks the state that I refreshed it in is the largest it can be. And if I decrease the window size after the refresh the scroll x bar appears. Same as before. I've set the width of the table in the HTML to 100% and defined my dataTable as followed:
table = $('#some_table').dataTable({
"dom": 'T<"clear">lfrtip',
"destroy": true,
"autoWidth": false,
"scrollX": true,
});
I've also tried using this function fnAdjustColumnSizing() and it doesn't help.