columnDefs.visible not working when stateSave=true
columnDefs.visible not working when stateSave=true

Hi,
The datatables was working fine until i switch to using $.fn.dataTable.defaults , after some digging found that columnDefs.visible is not working when stateSave=true. Any thoughts?
$.extend(true, $.fn.dataTable.defaults, {
paging: dfPaging,
lengthChange: dfLengthChange,
searching: dfSearching,
scrollX: dfScrollX,
scrollY: dfScrollY,
scrollCollapse: dfScrollCollapse,
stateSave: dfStateSave,
select: dtSelectOptions
});
var dtTableContactGroupsContent = {
data: input,
columns: [
{ data: null, defaultContent: '' },
{ data: 'Id', 'visible': false },
{ data: 'Name' },
{ data: 'Description' }
],
columnDefs: [
{
targets: 0,
orderable: false,
className: 'select-checkbox'
}, {
"targets": [1],
"visible": false,
"searchable": false
}
],
order: [[2, 'asc']]
};
This discussion has been closed.
Answers
Hi @badasscc ,
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
Test case reated: http://live.datatables.net/yaliciwe/1/edit
Can you give instructions on how to reproduce the issue, please. I ran it, and that second column, Position, wasn't visible as expected.