Call modal record view from anywhere.
Hi there.
I really appreciate the hard work of the creators and every one who contributed for this amazing package.
I'm curious how can I call the modal infolist from anywhere in the app?
For example:
I have the public static function infolist inside my PostResource to open a modal view.
How can I create an url/link inside Dashboard page to show the infolist modal for post id 1?
I know how to create a url redirect to a full-page, but haven't found out how to create a url to call the infolist modal.
Thank you so much.
Solution:Jump to solution
You would use your ListPage instead ManageXx page. You would mount
view
action instead edit
in that code9 Replies
Anyone?
Bump... I asked this same question several months ago. I would love to get an answer.
You could try something like that
https://discord.com/channels/883083792112300104/1282780956259913759/1282911602345115689
hi. Thanks for your reply.
What if I use the Full Resource pages? (I mean, Creat/Edit/List child pages inside the Resource), what would I do in that case?
Do you have a modal action in this resource?
yes, I mean, sort of.
I've created the infolist, and then call it when click on the row with the ->recordAction(Tables\Actions\ViewAction::class) method.
Sorry, my english was bad.
Solution
You would use your ListPage instead ManageXx page. You would mount
view
action instead edit
in that codeOh, I've try putting your code into the List page, it kinda worked
thank you so much
Thank you
I'm sorry, but can I ask one more question?
How can I call the Modal without redirecting to the resource page?
Like when I'm on the Dashboard Page, I can click on the custom product link, and only open the modal infolist view without redirecting to the product resource page?