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:
You would use your ListPage instead ManageXx page. You would mount view action instead edit in that code
Jump to solution
9 Replies
Hung Thai
Hung ThaiOP3mo ago
Anyone?
nathan
nathan3mo ago
Bump... I asked this same question several months ago. I would love to get an answer.
Hung Thai
Hung ThaiOP3mo ago
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?
LeandroFerreira
LeandroFerreira3mo ago
Do you have a modal action in this resource?
Hung Thai
Hung ThaiOP3mo ago
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
LeandroFerreira
LeandroFerreira3mo ago
You would use your ListPage instead ManageXx page. You would mount view action instead edit in that code
Hung Thai
Hung ThaiOP3mo ago
Oh, I've try putting your code into the List page, it kinda worked thank you so much Thank you
Hung Thai
Hung ThaiOP3mo ago
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?
Want results from more Discord servers?
Add your server