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:
It's ->recordAction(). I thought this uses the first ->actions() entry that you have
Jump to solution
11 Replies
David | Fortune Validator
Just to clarify this is NOT using panels.
toeknee
toeknee5mo ago
->url($url, shouldOpenInNewTab: true)
David | Fortune Validator
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
toeknee
toeknee5mo ago
Just load an Action?!
David | Fortune Validator
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
toeknee
toeknee5mo ago
Ahh got ya! Then just add the record row action
toeknee
toeknee5mo ago
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
toeknee
toeknee5mo ago
Just on my phone so can’t check
David | Fortune Validator
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
Dennis Koch
Dennis Koch5mo ago
It's ->recordAction(). I thought this uses the first ->actions() entry that you have
David | Fortune Validator
To 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.
Want results from more Discord servers?
Add your server