Filament table in Livewire component!
Hey everyone, I hope you're all well!
Just a quick one.
I have a Livewire component, and a Filament table within.
It's all set-up and works well.
However, even though I have a $form in the component, when I click on View/Edit, the modals are empty.
Am I going wrong?!
All help much appreciated!
4 Replies
Did you include the
Directive? If they do show up its probably not the fix however.
Aah, I haven't.
The modals are popping up, but they're empty.
I don't know if I'm expected to populate them myself, but as Filament would normally do this via the return $form, I'm a little lost.
I've added the directive, but the modals are still empty.
I feel I've missed out something silly.
Maybe try something like: Action::make('view')
->label('View')
->url(fn (Model $record): string => ModelResource::getUrl('view', ['record' => $record])),
May or may not be relevant but keep in mind that actions are cached based on the name you provide in the ::make() method. So if you create an action with something like ::make(‘view’) it could create conflicts depending on the usage.