Skip to content

fix to get the checkbox to be checked if items is cell#60

Open
dagframstad wants to merge 1 commit intoDataTables:masterfrom
dagframstad:cell_unchecks
Open

fix to get the checkbox to be checked if items is cell#60
dagframstad wants to merge 1 commit intoDataTables:masterfrom
dagframstad:cell_unchecks

Conversation

@dagframstad
Copy link
Contributor

When checkbox is renderered and items is cell then this construct:

// And make sure this checkbox matches it's row as it is possible
// to check out of sync if this was clicked on to deselect a range
// but remains selected itself
this.checked = $(this).closest('tr').hasClass('selected');

will when the checkbox is clicked uncheck the checkbox because the element that gets selected (that has the selected class) is the td element, not the tr element which is the case when items is row.

I have included a testfile with two tests, but I could not quite understand how to these tests are run, so they might fail, but the intent is correct. If they don't work you are free to fix them or delete them.

I acknowledge that my contribution is offered under and will be made available under the project's existing license (MIT).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant