Column width not auto and custom widths being ignored
Column width not auto and custom widths being ignored
I'm using the bootstrap plugins for datatables and the columns are not sizing to the content width.
The first column is an index column with two digit numbers yet it takes up almost 20% of the table. The third column over is a string that could be up to 200px wide but the column is setting itself to 29px or something like that.
Is there a problem with the bootstrap plugins with bootstrap 3? I've been reading the forums and the manual and have tried a lot of things with no real success. Any tips are appreciated.
This is simple setup (piecing together manual and forum stuff).
<script type="text/javascript" class="init">
$(document).ready(function() {
var t = $('#article-table').DataTable( {
"pageLength": 25,
"order": [[ 2, "asc" ]],
});
t.on( 'order.dt search.dt', function () {
t.column(0, {search:'applied', order:'applied'}).nodes().each( function (cell, i) {
cell.innerHTML = i+1;
} );
} ).draw();
} );
</script>