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
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/LNDJSQt6Solution:Jump to solution
I finally find a solution here : https://v2.filamentphp.com/tricks/update-main-form-after-relationship-manager-crud
On EditResource.php:
```php
use Livewire\Attributes\On;...
Filament
Update Main form after Relationship Manager CRUD by iotron - Tricks...
Filament is a collection of tools for rapidly building beautiful TALL stack apps, designed for humans.
1 Reply
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):
Filament
Update Main form after Relationship Manager CRUD by iotron - Tricks...
Filament is a collection of tools for rapidly building beautiful TALL stack apps, designed for humans.