Skip to content

Commit

Permalink
Merge pull request #12266 from uberbrady/fix-select-all-bug
Browse files Browse the repository at this point in the history
Fixed: There was a bug with BS tables' select-all which showed an incorrect list of elements
  • Loading branch information
snipe committed Dec 20, 2022
2 parents 88291ca + 75a757d commit 128c21a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion resources/views/partials/bootstrap-table.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,10 @@ function dateRowCheckStyle(value) {
var tableId = $(this).data('id-table');
for (var i in rowsAfter) {
$(buttonName).after('<input id="' + tableId + '_checkbox_' + rowsAfter[i].id + '" type="hidden" name="ids[]" value="' + rowsAfter[i].id + '">');
// Do not select things that were already selected
if($('#'+ tableId + '_checkbox_' + rowsAfter[i].id).length == 0) {
$(buttonName).after('<input id="' + tableId + '_checkbox_' + rowsAfter[i].id + '" type="hidden" name="ids[]" value="' + rowsAfter[i].id + '">');
}
}
});
Expand Down

0 comments on commit 128c21a

Please sign in to comment.