Callback Action Is Not Firing For Columnstoggle Button
In the following JSFiddle the action function does not fire whenever a button to select a column in the column visibility button is selected. Below is the code that I am using: $(
Solution 1:
CAUSE
Button columnsToggle
doesn't have action
option as opposed to colvis
button.
SOLUTION
Handle column-visibility
event which is fired when the visibility of a column changes.
$('#example').on('column-visibility.dt', function(e, settings, column, state ){
console.log('Column:', column, "State:", state);
});
DEMO
See updated jsFiddle for code and demonstration.
Post a Comment for "Callback Action Is Not Firing For Columnstoggle Button"