Action shows view with nested actions?
Hey guys, how are you?
How would you approach creating an action that is a livewire component by itself? Meaning, that when you click it renders a dynamic view with actions nested?
I've used:
this returns an array, and in the blade file I user a foreach... but I want to be able to click an array item and when I click it, it renders a modal with something.
Thank you so much!
5 Replies
I think I don't understand the nested actions part... do you have something like a mockup of the UI you're trying to create?
@Patrick Boivin sorry for the delay, and thank you for your answer!
I don't have it at the moment but what I was trying to achieve:
- On a infolist I have an action that says "Browse Media" - slide over action
- When I open it it shows an upload form above and I wanted to display a table below with all the currently uploaded media
- When I click the media, it opens a modal with the file (clickable row action)
I don't know if this makes sense, but I'm having trouble defining an action that may be able to do this
Which part are you stuck on? Do you have the slideover action working?
I think I got it @Patrick Boivin... I ended up using a relation manager with the media model π (spatie medialibrary)...
In the table schema:
And in the view file:
Thank you for your input though π
If you click the row it previews the file (in the blade file) and inside that action there is an action to download (extraModalFooterActions)
Nice!