recordUrl() to open Modal
Hi all
Using a livewire component I want the row to open the View Action Model and not a page route.
Is this possible? I struggled to get it to work, find in the docs.
Solution:Jump to solution
It's
->recordAction()
. I thought this uses the first ->actions()
entry that you have11 Replies
Just to clarify this is NOT using panels.
->url($url, shouldOpenInNewTab: true)
will this open the View Action Modal though?
much like in panels you can click on the row and itll open the View or Edit Modal
I want the same to occur outside of Panels. I can direct the row to a Route but I dont think this is the way to accomplish opening the EditAction Model
Just load an Action?!
For the whole row though ? I have the edit button at the end working nicely. I just wanted it so clicking anywhere on the row would do the same
Ahh got ya! Then just add the record row action
https://filamentphp.com/docs/3.x/tables/advanced#record-urls-clickable-rows
I’m sure if you just do ‘edit’ or the edit button action name it’ll trigger it
Or… there’s another method similar like:
recordAction
Just on my phone so can’t check
That the reference I found in the docs. I just wasn’t sure how to attach the action. 🙈. For info, my edit button action has quite a bit of accompanying code etc.
No worries I appreciate it
"I’m sure if you just do ‘edit’ or the edit button action name it’ll trigger it "
I tried ->recordUrl('view') and it just tries to go to the currentUrl/view rather than opening the View Action I have in actions([])
Solution
It's
->recordAction()
. I thought this uses the first ->actions()
entry that you haveTo my rescue again 😄 thank you.
->recordAction('view')
worked nicely. I did a search for this in the docs and it didnt come up. Would be handy one for others possibly.