Missing lifecycle hooks before and after mount for actions without forms #19181
Carnicero90
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem Description
Actions that have forms provide
beforeFormFilled()andafterFormFilled()hooks, but there are no corresponding hooks for actions that don't have forms.Current Behavior
For actions WITH forms:
My Specific Use Case
I needed to call
$action->cancel()for some bulk actions in Filament 3, although there doesn't seem to be any meaningful difference in filament 4/5 at InteractsWithActions.php, when invalid records were selected based on business logic validation. Since there's no hook before mount for actions without forms, I cannot prevent the action from being mounted when the selected records don't meet the business requirements.Would the maintainers consider acceptable the idea of more generic
beforeMount()andafterMount()hooks that work for all actions?PS: Message partially drafted with an LLM help for better articulation
Beta Was this translation helpful? Give feedback.
All reactions