Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bulk actions function #467

Merged
merged 4 commits into from
Sep 26, 2021
Merged

Add bulk actions function #467

merged 4 commits into from
Sep 26, 2021

Conversation

fabio-ivona
Copy link
Contributor

hi @rappasoft!

this PR would add the capability to define bulkActions inside a function, this wil allow to generate them dynamically (for example using translation functions) or switching actions based on context

the old way of defining bulkActions will remain enabled:

class Table extends DataTableComponent
{
    //...
    public array $bulkActions = [  ... ]

but with this PR you could write this, as an alternative:

class Table extends DataTableComponent
{
    //...
    public function bulkActions(): array
    {
        return [
              'count' => __('pets.count'),
        ]
    }

@rappasoft
Copy link
Owner

Thank you for both modifying all 3 templates as well as adding tests!

@rappasoft rappasoft added the Awaiting Next Release Currently merged into development awaiting a release to master label Sep 26, 2021
@rappasoft rappasoft mentioned this pull request Sep 26, 2021
@rappasoft rappasoft merged commit 0064bd8 into rappasoft:master Sep 26, 2021
@fabio-ivona
Copy link
Contributor Author

You're welcome!

@fabio-ivona fabio-ivona deleted the add-bulk-actions-function branch September 26, 2021 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Next Release Currently merged into development awaiting a release to master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants