I'm looking to add this hack to my code
This can be a temporary fix for colvis, responsive export when using visible selector.
I'm referring to this post https://github.com/DataTables/Responsive/issues/90
buttons: [
{
name: 'print',
extend: 'print',
exportOptions: {
columns: [':visible:not(.not-export-col):not(.hidden)'],
},
action: function(e, dt, button, config) {
responsiveToggle(dt);
$.fn.DataTable.ext.buttons.print.action(e, dt, button, config);
responsiveToggle(dt);
}
},
]
I just don't know where to put the toggle action toggle code
I believe that need to be on datatables,js but not sure where and what is the syntax I should use.
responsiveToggle(dt) {
$(dt.table().header()).find('th').toggleClass('all');
dt.responsive.rebuild();
dt.responsive.recalc();
}