F
Filament16mo 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
LeandroFerreira16mo ago
\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
xyOP16mo ago
Sorry, should have clarified. This is for a hintAction.
LeandroFerreira
LeandroFerreira16mo ago
->hidden(fn (string $operation): bool => $operation === 'edit')
->hidden(fn (string $operation): bool => $operation === 'edit')
xy
xyOP16mo ago
Prefect, thanks
Want results from more Discord servers?
Add your server