Re-using a custom action on both a form and a table

I have a custom action that performs an operation on a single model and displays a notification. If it extends Filament\Tables\Actions\Action then it works fine on a table record row, and if it extends Filament\Actions\Action then it works fine on a model resource page header, but so far I haven't figured out how to have it work on both. Is this possible?
Solution:
It’s not possible. Currently in v3 table actions, form actions and general actions have to be separate classes. But you could reference the actions functionality from a common source of truth via their ->action() modifier.
Jump to solution
3 Replies
Solution
awcodes
awcodes3mo ago
It’s not possible. Currently in v3 table actions, form actions and general actions have to be separate classes. But you could reference the actions functionality from a common source of truth via their ->action() modifier.
awcodes
awcodes3mo ago
V4 should address this though as the actions are getting streamlined.
ChrisHardie
ChrisHardie3mo ago
Thank you!