Closed nonoantog closed 3 years ago
The extension injects three parameter to the callback, nodes, selected and indeterminated. I use an if statement to check if the selectAll checkbox is in indeterminated state or not like this:
function toggleAllAccess(nodes, selected, indeterminated) {
if (selected && !indeterminated) {
console.log(nodes);
}
}
There is selectAllCallback
option that allows you to define a function which will be called when "Select all" control in the header is clicked. Please see sample function provided by @vonDassendorf .
Clicking the checkbox on a row calls both functions => selectCallback and selectAllCallback likewise clicking on the select all checkbox. Is there a way around this?
HI,
I want to do some stuff when the user selects the checkbox in the header.
But, every time I check a row in the table body, it is calling to selectCallBack and it is calling selectAllCallback callback.
So.. is there a way to identify that the callback is from the header and not from the body row?
1) select a row in the body => callbacks called, select,selectAll 2) select from header check => callbacks called, selectAll
I know this is a question, not an issue. It should be tagged as questions.
Thanks.