I've been utilizing jQuery datatable and I am facing a challenge where the table width extends beyond the container it should be contained in.
I've attempted several solutions to fix this issue:
1. Setting the sWidth
option on both the table
and its columns
2. Changing the value of dataTables_wrapper
3. Setting bAutoWidth
to false
Despite trying these solutions, nothing seems to work as expected.
This is what my code currently looks like:
The JavaScript code:
$scope.dtOptions = DTOptionsBuilder
.fromSource('api/fromRest')
$scope.dtColumns = [
DTColumnBuilder.newColumn('firstCol').withTitle('first')
.....
The HTML code:
<table datatable="ng" dt-options="dtOptions" dt-columns="dtColumns"
dt-column-defs="dtColumnDefs">
<tfoot>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tfoot>
</table>