Skip to content

Commit

Permalink
Fix: Checkboxes weren't being selected on row creation if already pre…
Browse files Browse the repository at this point in the history
…-selected
  • Loading branch information
AllanJard committed Apr 2, 2024
1 parent 536c45f commit aa567e7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/dataTables.select.js
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,9 @@ function init(ctx) {

// Row
if (d._select_selected) {
$(row).addClass(ctx._select.className);
$(row)
.addClass(ctx._select.className)
.find('input.dt-select-checkbox').prop('checked', true);
}

// Cells and columns - if separated out, we would need to do two
Expand All @@ -630,7 +632,7 @@ function init(ctx) {
ctx.aoColumns[i]._select_selected ||
(d._selected_cells && d._selected_cells[i])
) {
$(d.anCells[i]).addClass(ctx._select.className);
$(d.anCells[i]).addClass(ctx._select.className)
}
}
}
Expand Down

0 comments on commit aa567e7

Please sign in to comment.