-
Notifications
You must be signed in to change notification settings - Fork 107
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 Grid bulk action methods #1920
Add Grid bulk action methods #1920
Conversation
Hard-coded version in demo to pack things together. Should be moved to Grid->addBulkModalAction()
This reverts commit 390bd97.
demos/collection/grid.php
Outdated
// Executing a modal on a bulk selection | ||
$callback = function ($m, $ids) use ($grid) { | ||
if (!$ids) { | ||
Message::addTo($m, [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build action button should be disabled instead when nothing is selected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice idea. have you an example of such magic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the master checkbox code could enable/disable bulk action button by querying a dedicated class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait on #1921 in the meantime, the action will return a void array, then iterating through it will do nothing.
Maybe there is an interest to |
Quality PR, thank you! |
Great ! |
fix #1727
This PR aims to add the bulk action feature to process a selection or multiple records in Grid. Currently it is easy to perform an operation:
addModalAction()
$grid->menu->addItem()
)It is complex to work with the results of
$grid->addSelection()
outside writing verbose code with static modals and a hidden field.