I'm using the DataTables
plugin to page a records into a panel. The problem is that this table has 5 columns, the last one is called action where there are 4 links (currently one below the other because of column size). I would like to increase the size of this column so that it is at least 2 on each line, it would only need to increase the size of the column. I currently have the following code:
$('#table-clientes').DataTable( {
"ajax": baseURL,
"deferRender": true,
"order": [[ 0, "asc" ]],
"pageLength": 300,
"columnDefs": [
{ "width": "50%", "targets":4 }
]
} );
When you're loading the page, the ação
column is the size I want, but when it loads, it returns to its tiny size. I already tried to put class
in columnDefs
and then in css
use width: 40%! Important but nothing worked.