Skip to content

Commit

Permalink
There was a bug with select-all where some bits didn't quite work
Browse files Browse the repository at this point in the history
  • Loading branch information
uberbrady committed Dec 20, 2022
1 parent 88291ca commit 75a757d
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 75a757d

Please sign in to comment.