Hide table actions for certain rows

Hi, Is it possible to hide certain table actions for example the editAction if a field of that row has a specific value?
3 Replies
ModestasV
ModestasV15mo ago
Yes, you can do this with this code:
Tables\Actions\EditAction::make()
->hidden(function ($record) {
return $record->value === 'hidden';
}),
Tables\Actions\EditAction::make()
->hidden(function ($record) {
return $record->value === 'hidden';
}),
Luukd_2000
Luukd_2000OP15mo ago
Thanks!
Want results from more Discord servers?
Add your server