Hide Actions on RelationManager

I am using ExampleResource::table($table) in a RelationManager. This includes all the actions that appear on that resource's table. When I call ->actions() to add a "DetachAction", this is added correctly. However, I would like a way of removing existing actions or resetting them. I tried the hiddenOn() behaviour that is available for table columns. Is this possible for actions?
Solution:
AH! My current branch is on an old version of Filament (Laravel 9, due to Nova). It appears this behaviour has been changed to how I expected it, in the latest version (different branch). Perfect!
Jump to solution
6 Replies
trovster
trovsterOP5mo ago
Does anyone know if it is possible to remove actions from a table listing?
LeandroFerreira
LeandroFerreira5mo ago
you can override the actions
ExampleResource::table($table)
->actions([
Tables\Actions\DetachAction::make(),
Tables\Actions\DeleteAction::make(),
])
ExampleResource::table($table)
->actions([
Tables\Actions\DetachAction::make(),
Tables\Actions\DeleteAction::make(),
])
trovster
trovsterOP5mo ago
@Leandro Ferreira This does not override them, this adds to them…
toeknee
toeknee5mo ago
It shouldn't can you provide all code please
Solution
trovster
trovster5mo ago
AH! My current branch is on an old version of Filament (Laravel 9, due to Nova). It appears this behaviour has been changed to how I expected it, in the latest version (different branch). Perfect!
trovster
trovsterOP5mo ago
Thanks for the debugging. I should've tested with my newer branch.
Want results from more Discord servers?
Add your server