Open an action from another action
I have the following InfoListAction:
Now when the
another
argument is set I want to open another action that is declared down later on15 Replies
I'm not sure where I should call these functions on in the infolistaction
Give that $this->replaceModalAction('name') a go in your action() closure, see if it works.
At the end of your action() closure. I don't think that return you have there does anything, don't think ->action() expects a return.
Aight
I don't think my component has those action methods since I'm not using the traits
And I'm using the actions inside the infolist component
Hmm, yeah, may not work there. I have to crash, I'll do some source diving tomorrow, see what I can see. I think the component has to implement the HasActions contract.
Hmm okay
Thanks for the help anyway
So my component looks like ...
Yeah maybe I'll just create separate actions for it then
And place them outside of my infolist
As I said in chat, Dan did this for me in a kind of quick and dirty way, so it may not work everywhere.
But chaining actions is something I find really useful, so I'll be pursuing it as v3 matures.
Yeah it's really useful to me too and I think to a lot of different users too
Dan is kinda swamped right now, so I don't want to bug him about it. But once things calm down a bit, I'm going to be trying to convince him to make this a more solid feature.
Aight, I'm gonna dive into the source to see if I can somehow acces those methods on the InfoListAction or if there are other methods for it
Aight. G'nite.
Good night, thanks for your input!