Responsive does not work inside flexbox.
Responsive does not work inside flexbox.
kjdion84
Posts: 9Questions: 3Answers: 0
The responsive plugin does not work when inside a flexbox container.
Example: https://jsfiddle.net/ejkp3yv9/
I attempted to add overflow: hidden
which had no effect (as mentioned here: https://datatables.net/forums/discussion/33468/datatables-responsive-inside-flexbox-doesnt-hide-columns)
This discussion has been closed.
Answers
I encountered a similar issue with scrollX not appearing to work, but the actual issue is with the Flex-related styles, not DataTables itself. See https://stackoverflow.com/questions/51338182/prevent-a-wide-table-from-stretching-the-flexbox-item-and-container-make-it-th.
The fix in your case involves the following steps:
So, your new CSS should look like this:
You can see that this fix works here: https://jsfiddle.net/ejkp3yv9/2/