© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•13mo ago•
1 reply
Endocrine

How to lock table records from being selected, depending on other selected Records

What I am trying to do:
I have a hierarchical structure of groups (example slugs):

- GroupA
- GroupA/GroupB
- GroupA/GroupC

I have a bulk action that sends a request to change the permission of a user of any group, but permissions are also inherited -> GroupA permissions also count for B, C but B, C do not count for each other or A.

The requirement I am facing is, that when any of those related groups are selected for the Bulk Action via the Resource Table (checkbox), the other related groups will not be selectable anymore and greyed-out or have a "-" in the checkbox or sth to signify, that they are not selectable anymore. (e.g.: Select A -> B and C are not selectable anymore)

I tried to find some kind of hook or event that gets fired when a record is selected for a bulk action, but wasn't able to find anything. I would be very grateful, if somebody could point me in the right direction of where to start to look.

Just as a hint where we are in the code:

class MyResource extends Resource 
{
//...
public static function table(Table $table): Table
{
// ...
  ->bulkActions(
    [
      Tables\Actions\BulkAction::make('Bearbeiten')
      ->form(
        [
          Select::make(self::USER_STRING)
           ->options(fn() => $allMembers->pluck('name', 'id')),
          Select::make(self::ACCESS_STRING)
          ->options(self::ACCESS_LEVELS)
    ]
  )
//...
}
}
class MyResource extends Resource 
{
//...
public static function table(Table $table): Table
{
// ...
  ->bulkActions(
    [
      Tables\Actions\BulkAction::make('Bearbeiten')
      ->form(
        [
          Select::make(self::USER_STRING)
           ->options(fn() => $allMembers->pluck('name', 'id')),
          Select::make(self::ACCESS_STRING)
          ->options(self::ACCESS_LEVELS)
    ]
  )
//...
}
}
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to get selected records on table from livewire
FilamentFFilament / ❓┊help
2mo ago
How to run a BulkAction on selected to table records
FilamentFFilament / ❓┊help
2y ago
Limit max selected records on bulk table
FilamentFFilament / ❓┊help
3y ago