I have a datatable table in which I show some columns or others depending on a variable. The problem is that by changing the number of columns, I can not do column alignment with the target.
"columnDefs": [
{className: "dt-body-right","targets": [3,10,11]},
],
How could a column be aligned, for example by its name?
"columns": [ {
"data": "name"
}, {
"data": "fch_fin_prevista"
}, ],
});