Table data sometimes apear when columns are hidden
Table data sometimes apear when columns are hidden
TristanLG
Posts: 3Questions: 1Answers: 0
Hello,
Sometimes, when i redraw datatable through API, or refreshing my page, i can see column datas rendered from hidden columns (see the picture, the 2 last columns should not apear).
Below, my configuration :
//Cols are initiated properly, with the 3 following attributes : name, orderable, visible
var table = $("#myTable);
table.dataTable({
"autoWidth": false,
"processing": false,
"serverSide": true,
"pageLength": 15,
"className": 'data-title',
"ajax": 'my-link-to-ajax.php',
"columns": cols,
"order": [1, 'desc'],
"pagingType": 'full_numbers',
"drawCallback": function() {
redrawLabels();
}
});
Can you help me ?
This discussion has been closed.
Answers
Someone ?
Maybe you can define your table with class 'hidden' and as soon the document is loaded remove the hidden class, that way during load nothing is shown.
I do this with forms, like this:
Can you link to a test case showing the issue rather than a screenshot please?
Allan
I don't know how to produce case test using ajax source
But i also guess that it can be due to one of my script using td for other purposes...
Thanks for your answers, i'll try to figure it out.
If it is due to dataTable i'll come back and post my answer