F
Filament2y ago
xy

hiddenOn alternative for Action

Is there a hiddenOn alternative for Filament\Forms\Components\Actions\Action? I want to hide a form action on edit.
4 Replies
LeandroFerreira
\Filament\Forms\Components\Actions::make([
\Filament\Forms\Components\Actions\Action::make('myAction')
->action(function () {
//
})
])->hiddenOn('edit')
\Filament\Forms\Components\Actions::make([
\Filament\Forms\Components\Actions\Action::make('myAction')
->action(function () {
//
})
])->hiddenOn('edit')
?
xy
xyOP2y ago
Sorry, should have clarified. This is for a hintAction.
LeandroFerreira
->hidden(fn (string $operation): bool => $operation === 'edit')
->hidden(fn (string $operation): bool => $operation === 'edit')
xy
xyOP2y ago
Prefect, thanks

Did you find this page helpful?