Skip to content

[Bug] Bulk Action Button's alwais disabled #5865

@gbenfe

Description

@gbenfe

In Backpack 7 I added a bulk action button in the top of list.

Image

Button's always disabled when check entries.

Image

I think problem is inside this script bulk_actions_checkbox.blade.php:

       // Check if this table is configured for bulk actions
        const hasBulkActions = tableElement.getAttribute('data-has-bulk-actions') === 'true' ||
                          tableElement.getAttribute('data-has-bulk-actions') === '1';

        // Find all bulk buttons
        const tableWrapper = document.getElementById(`${tableId}_wrapper`);
        const bulkButtons = tableWrapper.querySelectorAll('.bulk-button');

        // Update all buttons based on selection state

I added button via

$this->crud->addButton('top', 'bulk_categories', 'view', 'bulk_categories', 'beginning'); in setupListOperation

then

.bulk-button is placed before tableWrapper element

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions