© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•12mo ago
eduardichim

searchable select mobile not focusing to open keyboard when clicked

I have the following select, on desktop work great, but on mobile not so much

In order to search for a location you first have to start typing in order for it to be populated, when you open it first on mobile it won't focus the "search box" that is below the input in order open the keyboard and start typing, is it something I'm missing or?!?

On desktop you just click it and as soon as you start typing it's all good...
Select::make('location_id')
    ->label(__('inputs.label.car_location'))
    ->placeholder(__('inputs.placeholder.car_location'))
    ->rules('required|exists:locations,id')
    ->required()
    ->searchDebounce(300)
    ->getSearchResultsUsing(function (string $search) {
        return Location::where('county', 'like', "%{$search}%")
            ->orWhere('name', 'like', "%{$search}%")
            ->limit(25)
            ->orderBy('county')
            ->orderBy('name')
            ->get()
            ->mapWithKeys(function (Location $location) {
                return [$location->id => "$location->name | $location->county"];
            })
            ->toArray();
    })
    ->getOptionLabelUsing(function (string $value) {
        if (!$location = Location::find($value)) {
            return null;
        }

        return "$location->name | $location->county";
    })
    ->searchable()
    ->searchPrompt(__('inputs.location_search'))
Select::make('location_id')
    ->label(__('inputs.label.car_location'))
    ->placeholder(__('inputs.placeholder.car_location'))
    ->rules('required|exists:locations,id')
    ->required()
    ->searchDebounce(300)
    ->getSearchResultsUsing(function (string $search) {
        return Location::where('county', 'like', "%{$search}%")
            ->orWhere('name', 'like', "%{$search}%")
            ->limit(25)
            ->orderBy('county')
            ->orderBy('name')
            ->get()
            ->mapWithKeys(function (Location $location) {
                return [$location->id => "$location->name | $location->county"];
            })
            ->toArray();
    })
    ->getOptionLabelUsing(function (string $value) {
        if (!$location = Location::find($value)) {
            return null;
        }

        return "$location->name | $location->county";
    })
    ->searchable()
    ->searchPrompt(__('inputs.location_search'))
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

Multi tenancy - Select relationship() - Searchable() remove tenant information when clicked
FilamentFFilament / ❓┊help
3y ago
Select searchable
FilamentFFilament / ❓┊help
2y ago
Select disableOptionWhen() not working when using searchable()
FilamentFFilament / ❓┊help
3y ago
Select searchable() not firing afterStateUpdated()
FilamentFFilament / ❓┊help
3y ago