© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
onursahindur

Select field with Checkbox

Hello again all,
I want to disable a basic select field when checkbox is checked, I made both components reactive and getting the checkbox component's state in disabled closure correctly, even Select disabled function gets called after checkbox updated

But the even if checkbox disabled state returning false, select disabled state is not changing. It stays same as if the first page load state. Am I missing something?

Here is my code;

Checkbox::make('send_all_users')
    ->label('Send to everyone')
    ->inline()
    ->reactive(),

Select::make('branch_ids')
    ->reactive()
    ->label('Choose branch ids')
    ->hint('Seçili şube üyelerine gönderin')
    ->multiple()
    ->searchable()
    ->options(fn () => 
        Branch::where('corp_id', $authUser->corp_id)
        ->get()
        ->pluck('title', 'id')
    )
    ->disabled(function (Closure $get) {
        error_log('send_all_users: ' . !boolval($get('send_all_users')));
        return !boolval($get('send_all_users'));
    }),
Checkbox::make('send_all_users')
    ->label('Send to everyone')
    ->inline()
    ->reactive(),

Select::make('branch_ids')
    ->reactive()
    ->label('Choose branch ids')
    ->hint('Seçili şube üyelerine gönderin')
    ->multiple()
    ->searchable()
    ->options(fn () => 
        Branch::where('corp_id', $authUser->corp_id)
        ->get()
        ->pluck('title', 'id')
    )
    ->disabled(function (Closure $get) {
        error_log('send_all_users: ' . !boolval($get('send_all_users')));
        return !boolval($get('send_all_users'));
    }),
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

Multiple checkbox field
FilamentFFilament / ❓┊help
3y ago
Multiple select as table with checkbox
FilamentFFilament / ❓┊help
3y ago
Checkbox image/select row
FilamentFFilament / ❓┊help
2y ago
Disable "select all" checkbox
FilamentFFilament / ❓┊help
3y ago