Is it possible to disable to select a record in bulk action or somehow to disable delete bulk action
I have table with roles, roles can be edited but not all roles can be deleted i want to disable the option of deleting the role with name admin i did in table but i am not able to stop delete role with bulk action delete is it possible to disable the delete bulk action on some record or disable the select the record
7 Replies
Just fail it when going to delete? If role = X return false ?
that would be bad UX
hmm debatable, but you can try to condition the visibility based on records
->visible(fn($records) => logic )
i am getting the error
An attempt was made to evaluate a closure for [Filament\Tables\Actions\DeleteBulkAction], but [$record] was unresolvable.
It's a bulk action, so '$records'
Thanka brother
Thanks