F
Filament3mo ago
Ashk

Infolist and action group

Hi, I'm looking for a way to have an action group in an infolist, specifically an action dropdown to be more precise. I've tried a few things and can't find anything, maybe it's just not implemented?
17 Replies
Ashk
AshkOP3mo ago
There is type issue, Infolist always expect action inherit of Filament\Infolists\Components\Actions\Action 😦 or of Component belongs to Infolist I didn't find a way to use ActionGroup in infolist schema, nor headerActions
Ashk
AshkOP3mo ago
for instance, headerActions method only allow Action from Infolist 😦
No description
toeknee
toeknee3mo ago
Hmmm my only other thought is to add support to it? Or build your own custom action which supports multiple actions?
Ashk
AshkOP3mo ago
In fact, I'm not even sure it's possible in a Form context too 😮 I'll try to do something custom but I've the feeling to reinvent the wheel 😦
toeknee
toeknee3mo ago
I've got a feeling you could put an ActionGroup into an ->action() but could be wrong
Ashk
AshkOP3mo ago
Hmm normally action method is a backend callable and not something use to render thing (I believe) I tried, but nothing happen on click
Firebat
Firebat3mo ago
you could just use a custom view, and call the blade component dropdown https://filamentphp.com/docs/3.x/support/blade-components/dropdown or do something like https://filamentphp.com/docs/3.x/infolists/entries/custom and put filament components inside let me find the exampel
Ashk
AshkOP3mo ago
Yeees I tried it's working well, we just lose the "sugar syntax" but I can achieve what I want :p I investigate a bit the code to try to create a PR, but it's really complicated 😮
Firebat
Firebat3mo ago
thru embedding you might get your solution
Ashk
AshkOP3mo ago
WOOOW I didn't know this feature I'm checking that
Firebat
Firebat3mo ago
yeah, its kinda hidden, i dont know if you can use it on infolists
Ashk
AshkOP3mo ago
Thank you a lot for your sharing !
Firebat
Firebat3mo ago
no problem, good luck!
toeknee
toeknee3mo ago
Great stuff
Want results from more Discord servers?
Add your server