F
Filament2d ago
AKM

Set Action as iconButton() specifically handle record actions not overall

is there any way to set record action as icon button globally without change one by one in every action and resources ?
4 Replies
Oscar Carvajal
Inside any service provider's boot() method, you can apply global settings calling the static coonfigureUsing() component method. I always create a "CustomizationServiceProvider.php" with all my Filament customizations
No description
AKM
AKMOP12h ago
Thanks, bro. I really appreciate it. This works, but it will need some extra steps for actions that require labels, like the header action, login button, and form action button. I was just wondering if there’s a global function that could specifically handle record actions in tables using only the button icon, without changing the default button view overall. That’s what I was trying to ask.
Povilas Korop
Povilas Korop10h ago
Just tried the same example by @Oscar Carvajal but with EditButton, works for me:
use Filament\Actions\EditAction;

class AppServiceProvider extends ServiceProvider
{
public function boot(): void
{
EditAction::configureUsing(function (EditAction $action) {
$action->iconButton();
});
}
}
use Filament\Actions\EditAction;

class AppServiceProvider extends ServiceProvider
{
public function boot(): void
{
EditAction::configureUsing(function (EditAction $action) {
$action->iconButton();
});
}
}
Povilas Korop
Povilas Korop10h ago
result:
No description

Did you find this page helpful?