Delete button
Hi everyone! I'm new to FilamentPHP and I'm trying to add custom "Edit" and "Delete" buttons to my table. The "Edit" button works perfectly, but the "Delete" button isn't functioning. I'm using the default mountTableAction('delete', '{$record->id}') method for the delete functionality.
Here’s the code for my custom delete button:
I also added this button to a mobile-only section:
The "Edit" button works fine, but when I click the "Delete" button, nothing happens. I suspect there might be an issue with the wire:click directive or permissions, but I'm not sure.
Could someone please help me figure out why the "Delete" button isn't working? Any advice would be greatly appreciated!

4 Replies
What is custom about the delete action?
Ie, what doesn’t the default delete action do that you need?
Thank you for asking! I’m not trying to change the functionality of the delete action itself. The default delete action works fine in terms of deleting the record. However, I wanted to customize the appearance and placement of the delete button to match my design requirements.
Specifically:
I added a custom-styled button with a unique class and icon.
I also wanted the button to appear only on mobile devices, so I grouped it with the edit button in a mobile-only section.
The issue is that while the custom edit button works as expected, the custom delete button doesn’t trigger the delete action when clicked. I suspect there might be an issue with how I’ve set up the wire:click directive or how the mountTableAction method is being called.
I’m not trying to change the logic of the delete action itself—just its appearance and placement. Does that make sense?
It makes sense, but in that case it sounds like a custom filament theme and css makes more sense.
Thank you for the suggestion! I didn’t think about using Filament’s theming or CSS to customize the button. That’s a much cleaner approach, and I’ll look into it. Really appreciate your help! 😊