F
Filament2mo ago
Enas

infolist with livewire

Hello all, I have livewire component that show list of members and I have Viewaction that show member details in infolist, I pass the $record from livewire to MemberForm class correctly (I try dd($record) and show corret data ) but inside infolist it didn't show anything.
No description
No description
No description
No description
Solution:
```php ViewAction::make() ->infolist([ TextEntry::make('type'), ......
Jump to solution
8 Replies
Marco "Mint" Introini
I have exacly the same problem. Have you found a solution for this?
toeknee
toeknee4w ago
ViewActions render forms not infolists usually.... So when using ViewAction you'll need to ensure the form on the class has a schema
LeandroFerreira
ViewAction supports infolist. Please share the code that you are using
Marco "Mint" Introini
Thanks Leandro
Marco "Mint" Introini
This is the code. I really think it is a very basic thing I've missed
Solution
LeandroFerreira
ViewAction::make()
->infolist([
TextEntry::make('type'),
...
])
ViewAction::make()
->infolist([
TextEntry::make('type'),
...
])
?
Dennis Koch
Dennis Koch4w ago
I think you are mixing in some syntax that's used inside the Panels resources.
Marco "Mint" Introini
I feel so speechless. Yes, you are absolutely right. I was using it like I do inside Panels Resources. Making this way works perfectly:
->actions([
ViewAction::make()
->infolist([
TextEntry::make('gateway.name'),
TextEntry::make('type')
->badge(),
TextEntry::make('common_name'),
TextEntry::make('valid_from'),
])
])
->actions([
ViewAction::make()
->infolist([
TextEntry::make('gateway.name'),
TextEntry::make('type')
->badge(),
TextEntry::make('common_name'),
TextEntry::make('valid_from'),
])
])
Really thank you so much for your help!!
Want results from more Discord servers?
Add your server