[propose] Event trigger after selection set has been changed state
nguyenhaiphan opened this issue · 6 comments
Thank for your great plugin.
Do you have any intention to support event after the selection set has been changed state?
This has already been implemented, see columns.checkboxes.selectCallback for handling event when state of the checkbox changes and columns.checkboxes.selectAllCallback for handling event when state of the "select all" control changes.
Thank you very much
@legreco, see this example demonstrating use of columns.checkboxes.selectCallback and columns.checkboxes.selectAllCallback.
Yes, I just see the example, but i have another problems,
- when the page first load the selectAllCallback is called
- If i click on a row checkbox the selectAllCallback is also called
My code:
`
columnDefs: [
{
'targets': 0,
'checkboxes': {
'selectRow': true,
'selectAllCallback': function(nodes, selected, indeterminate){
alert('function is called');
}
},
}
],
'select': {
'style': 'multi'
},`
Here is an example
https://jsfiddle.net/legreco/6wegnxLz/ of this behavior