Action inside modal is not working
Hi
I have action that open a modal with custom view. On that view I have another action but when I click on that action nothing happens:
And this is my
/resources/filament/modals/payments-list.blade.php
file:
I am setting record on my $removePaymentAction button inside foreach loop. When I click on that button, spinner show and then disappear and nothing happens. The record doesn't get deleted. Confirmation dialog also is not triggering. Can someone help?Solution:Jump to solution
Just to post an update how I solved this problem. The problem was my misuse of Filament actions.
I've created new Livewire component in which created filament table, just like the documentation says. I've passed my invoice record to the livewire via property.
```php...
7 Replies
you need
<x-filament-actions::modals />
inside that viewWhen I add that inside my view then clicking on main table action returning 500 ERROR. In console I can see:
You're showing the payload not the response.
There is no response at all
I get black modal open across the whole page with no response. Just black modal
As I am using remove payment button inside of the for loop I created a function that constuct DeleteAction button for every row like this, but still doesn't work:
And then in view my loop goes like this:
But that still doesn't work for some reason.
Hi Saade, thank you for your help. I've refactored my code like this:
And in the view:
In the view I am renaming the button so it has unique name and assign record to be payment. There is no error, but that delete button is still not working. The record is not deleted in the database when the button is clicked.
Solution
Just to post an update how I solved this problem. The problem was my misuse of Filament actions.
I've created new Livewire component in which created filament table, just like the documentation says. I've passed my invoice record to the livewire via property.
And in the modal content view I called the livewire component like this:
And finally Action that opens that modal: