Refresh my form after custom "Cancel" action
Hi guys. I created an action that allow to cancel a mission (switch status + fill cancellation related fields). Those fields are visible on my
The problem is, when the action is performed, the fields appears but they are not fill with the data I just typed, but those that where loaded at the loading of the page. I tried to use
Here is my action code : https://pastebin.com/LNDJSQt6
MissionResource.php only if the status is CANCELLED.The problem is, when the action is performed, the fields appears but they are not fill with the data I just typed, but those that where loaded at the loading of the page. I tried to use
protected $listeners = ['refreshEditMissions' => '$refresh']; on the EditMissions.php page and dispatch the event in the action, I tried to use the refreshFormData method, but nothing is working. Please help Here is my action code : https://pastebin.com/LNDJSQt6
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Solution
I finally find a solution here : https://v2.filamentphp.com/tricks/update-main-form-after-relationship-manager-crud
On EditResource.php:
Then you can call it with (p.e. inside an action):
On EditResource.php:
Then you can call it with (p.e. inside an action):
Filament
Filament is a collection of tools for rapidly building beautiful TALL stack apps, designed for humans.