actions modal already showing backdrop
Hi I have just been using FilamentPHP's table, form and actions without the admin panel.
When I create an action and add <x-filament-actions::modals /> to my blade to render the modals, the page goes dark as if the modal has been triggered with a backdrop. This goes away when I remove the '<x-filament-actions::modals />' but the button do not perform any action although the event are being sent.
7 Replies
Hi can anyone help me with this? Happy holidays
Where are you adding the blade component?
Right at the end of the component's view file making sure i have the one root element.
Component blade
<div>
<div>
{{ $this->deleteAction }}
</div>
<x-filament-actions::modals />
</div>
Component delete method
php
public function deleteAction(): Action
{
return Action::make('delete')
->requiresConfirmation()
->action(fn () => dump('action delete'));
}
php
Thank you for the helpYou don't need to add
<x-filament-actions::modals />
, you should use a deleteAction
in the actions([])
table
https://filamentphp.com/docs/3.x/tables/actions#prebuilt-table-actionsThank for the quick response, unfortunately I am only trying to use the Actions module for the filament so i am following this from the documentation https://filamentphp.com/docs/3.x/actions/adding-an-action-to-a-livewire-component. The button renders okay and from the network, an event is fired off, everytime you click, however the when I add I get the backdrop making it imposible to click anything on the page. Thanks again
Any console errors.?
No it's actually clean - I will install a fresh app and move things over in bits, see if i can find the cause