Accessing reference to calling object from action class
I created an action class that extends the original action, override setUp(), and called it from a resource viewrecord page. How do i inject viewrecord instance so that I can call its' fillForm() to refresh the page once the action is performed?
class ReviseUserDetail extends Actions\Action
5 Replies
for now i did it by calling fillForm() in the after() method, but i still wonder if its possible to do it from the action class itself.
class ViewOrder extends ViewRecord
Does this help? This is the source for the Tables ViewAction class: https://github.com/filamentphp/filament/blob/954e9640953dd8e3157bb2478a15dd7c47887306/packages/tables/src/Actions/ViewAction.php#L36-L48
GitHub
filament/packages/tables/src/Actions/ViewAction.php at 954e9640953d...
A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS. - filamentphp/filament
tried following the source for actions EditAction, it only fills the form with data, but doesn't refresh the main page
Apologies: I don't have a better answer ... yet. I'm going to need to do something similar in an app I'm working on, but there's another milestone to finish first before I have to tackle that one.
no worries, do provide a follow up if u figure somth out hehe.