8000 Merge pull request #5383 from RohanSharma1994/5382-batch-dropdown-wil… · stephancom/activeadmin@e2af261 · GitHub
[go: up one dir, main page]

Skip to content

Commit e2af261

Browse files
authored
Merge pull request activeadmin#5383 from RohanSharma1994/5382-batch-dropdown-will-be-disabled-if-no-batch-actions
Batch action drop down should disable if there are no batch actions
2 parents d542d54 + c1b9cb6 commit e2af261

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/assets/javascripts/active_admin/lib/batch_actions.es6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const onDOMReady = function() {
4141
}
4242

4343
$(document).on('change', '.paginated_collection :checkbox', function() {
44-
if ($(".paginated_collection :checkbox:checked").length) {
44+
if ($(".paginated_collection :checkbox:checked").length && $(".dropdown_menu_list").children().length) {
4545
$(".batch_actions_selector").each(function() { $(this).aaDropdownMenu("enable"); });
4646
} else {
4747
$(".batch_actions_selector").each(function() { $(this).aaDropdownMenu("disable"); });

0 commit comments

Comments
 (0)
0