Infolist and Actions confusion
Appreciate if someone can help me fill a gap in my knowledge with creating actions on infolists.
I'm getting my view page infolist from the function within the resource class:
I have got suffix\prefix\hint actions working, but if I try and deploy just an action within the infolist, something like:
It fails:
Filament\Infolists\ComponentContainer::Filament\Infolists\Concerns{closure}(): Argument #1 ($component) must be of type Filament\Infolists\Components\Component, Filament\Infolists\Components\Actions\Action given
I think I'm following the manual: https://filamentphp.com/docs/3.x/infolists/actions
Where am I confused ?
Solution:Jump to solution
Look further down the page of the link you shared. You’re looking for anonymous actions. Basically, you can’t include an action directly, you have to wrap it with an ‘Actions’ entry.
2 Replies
Solution
Look further down the page of the link you shared. You’re looking for anonymous actions. Basically, you can’t include an action directly, you have to wrap it with an ‘Actions’ entry.
@awcodes -- thanks this solves the problem. It has left me wondering what an 'infolist component' is, and where I might use the action directly as per the docs?