When working with the following JSFiddle, I noticed that the action function does not seem to fire whenever a button to select a column in the column visibility tool is selected. Check out the code snippet below for reference:
$(document).ready(function() {
var table = $('#example').DataTable( {
dom: 'B',
"buttons": [
{
extend: 'colvis',
postfixButtons: ['colvisRestore'],
buttons : [{
extend: 'columnsToggle',
action: function (e, dt, node, config) {
alert('Activated!');
console.log("Activated!");
},
}],
}
],
}
);} );
Your assistance in resolving this issue would be greatly appreciated.