Merged
Conversation
Hard-coded version in demo to pack things together. Should be moved to Grid->addBulkModalAction()
This reverts commit 390bd97.
mvorisek
reviewed
May 29, 2023
mvorisek
reviewed
May 29, 2023
demos/collection/grid.php
Outdated
| // Executing a modal on a bulk selection | ||
| $callback = function ($m, $ids) use ($grid) { | ||
| if (!$ids) { | ||
| Message::addTo($m, [ |
Member
There was a problem hiding this comment.
Build action button should be disabled instead when nothing is selected.
Contributor
Author
There was a problem hiding this comment.
nice idea. have you an example of such magic?
Contributor
Author
There was a problem hiding this comment.
Maybe the master checkbox code could enable/disable bulk action button by querying a dedicated class
Contributor
Author
There was a problem hiding this comment.
Wait on #1921 in the meantime, the action will return a void array, then iterating through it will do nothing.
mvorisek
reviewed
May 29, 2023
mvorisek
reviewed
May 29, 2023
mvorisek
reviewed
May 29, 2023
mvorisek
reviewed
May 29, 2023
mvorisek
reviewed
May 29, 2023
mvorisek
reviewed
Jun 13, 2023
Contributor
Author
|
Maybe there is an interest to |
Member
|
Quality PR, thank you! |
Contributor
Author
Great ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.