Adjust first column height in responsive mode
Adjust first column height in responsive mode
jgo1986
Posts: 1Questions: 1Answers: 0
Hello,
I have a table with more than 20 colums so I am using responsive property as follows:
var tablafiltros=$('.tablafiltros_fijo').DataTable( {
dom: 'Bfrtip',
"autoWidth" : false,
buttons: ['csv', 'excel','print','copy'],
paging:false,
responsive:true,
"order": [[ 0, "desc" ]],
"columnDefs": [
{
"targets": 3 ,
"data": "download_link",
"render": function ( data, type, row, meta ) {
return $('<a>')
.attr('href','/tickets/tirs/tir_hijo/'+ data)
.text(data)
.wrap('<div></div>')
.parent()
.html();
}
},
{ responsivePriority: 1, targets: 0 },
{ responsivePriority: 2, targets: 1 },
/** more priorities*----*/
]
} );
}
As result of this configuration, the first column (fecha) is written in 2 lines, I mean, the column width is too small:
I've been trying to adjust first column width but it doesnt work (https://datatables.net/reference/option/columns.width)
Any hint? thanks in advance
This discussion has been closed.
Answers
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin