I use DataTable with Fixed Columns extension and styling with Bootstrap. The columns I set up as fixed contain Bootstrap's dropdown elements.
The problem is when I click on the dropdown element, my fixed column show the scroll bars or sometimes overflow
were hidden as
Below is the code for initialization of my dataTable
var oTable = $('table').dataTable( {
bFilter : false,
ordering: false,
sScrollX: "100%",
fixedColumns : {
leftColumns : 0,
rightColumns : 1
},
pagingType : "full_numbers",
"sDom" : '<"top">rt<"bottom"ifp><"clear">',
} );
Here is the JS Fiddle Link. Has someone experience with this or how can I fix this ? Thanks.
You need to append the dropmenu to body and some css to hide the fixed column overflow.
You can tweak the code as per your need.
Check Working Demo HERE
CSS:
JS:
It seems there's no way to expand a width of column according to dropdown width using pure CSS or bootstrap. I think you can make it wider just setting a column fixed width like this:
Also you can make button as wide as column is by adding class
btn-block
: