Skip View Step
Hi all
I have the below action code on my filament page. It will open a modal which in turn opens a livewire component with a filament table on it.
The above opens . Can I skip a step and simply call the livewire component from within the Action code ?
8 Replies
Try:
Thank you,. I just came across this as well:
Do you think there is a best way of doing this out of the three options?
The above is good
hmm, im getting
Filament\Actions\MountableAction::getModalContent(): Return value must be of type Illuminate\Contracts\View\View|Illuminate\Contracts\Support\Htmlable|null, string returned
on your Blade version
looks like it needed :
HtmlString
Yep that should do it, my version was just freehanded memory
no problem. Much appreciated
on a random pointer. I did notice the use of =lazy="on_load" is needed on the component call, otherwise the first click on the modal is ignored for some reason
actually slightly nicer ways seems to have #[Lazy(isolate: true)] on the livewire component itself
sorry to hassle you again but I wanted your advice if I may:
I want to pass some data to the mount of the livewire component. would the above be the right way. It does work but again I want to make sure im doing things the right way
That looks right
thank you