© 2026 Hedgehog Software, LLC

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

Select component with searchable & live?

Hi all,

I have a select box populated via a query that has the live method enabled as there is a dependent select whose options change depending on what is selected in the parent. If I enable searchable on the parent select the functionality doesn't work. A red box is placed around the parent select. The dependent select is not updated. It works fine if searchable is not enabled. I have tried adding debounce(600) as I have seen suggested by it doesn;t change the outcome.

                Section::make()->schema([
                    Select::make('Customer')->options(Models\Customer::all()->pluck('CompanyName', 'ID')
                        ->sort(function ($customer1, $customer2) {
                            return strtolower($customer1) <=> strtolower($customer2);
                        }))->label('Customer')
                        ->live(),
                    //->searchable(),
                    // })->reactive(),
                    //->debounce(600),
                    Select::make('Contact')
                        ->options(function (Get $get): Collection {
                            $customer_id = $get("Customer");
                            $results = Models\CustomerContact::where('CustomerId', $customer_id)->pluck('Name', 'CustomerContactID')
                                ->sort(function ($customer1, $customer2) {
                                    return strtolower($customer1) <=> strtolower($customer2);
                                });
                            return $results;
                        })
                        ->label('Contact')
                        ->searchable(),
                Section::make()->schema([
                    Select::make('Customer')->options(Models\Customer::all()->pluck('CompanyName', 'ID')
                        ->sort(function ($customer1, $customer2) {
                            return strtolower($customer1) <=> strtolower($customer2);
                        }))->label('Customer')
                        ->live(),
                    //->searchable(),
                    // })->reactive(),
                    //->debounce(600),
                    Select::make('Contact')
                        ->options(function (Get $get): Collection {
                            $customer_id = $get("Customer");
                            $results = Models\CustomerContact::where('CustomerId', $customer_id)->pluck('Name', 'CustomerContactID')
                                ->sort(function ($customer1, $customer2) {
                                    return strtolower($customer1) <=> strtolower($customer2);
                                });
                            return $results;
                        })
                        ->label('Contact')
                        ->searchable(),
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

Select with live() and searchable()
FilamentFFilament / ❓┊help
16mo ago
Select Blade Component - Searchable
FilamentFFilament / ❓┊help
2y ago
Default value with searchable in select component
FilamentFFilament / ❓┊help
3y ago
Select component with searchable() inside in Repeater component with orderable()
FilamentFFilament / ❓┊help
3y ago