© 2026 Hedgehog Software, LLC

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

Prevent select option re-rendering in SelectInput

Hi, I am using a SelectInput that looks something like this

Select::make('test')->options(Post::query()->get()->pluck('id, title')
Select::make('test')->options(Post::query()->get()->pluck('id, title')


I am using this in a Wizard and my problem is that I have about 6-7 selects that rely on DB queries. This causes issues anytime I go between pages in the Wizard and the form ends up becoming very slow because it runs the DB query for the select options if there is any kind of validation, live state update, or change in wizard step.

I would like to make it so that I only have to query the DB once for the select options, on page load.

I could store the select options in public variable on the Form and call the query only once, in the mount method, and passing the variable as the options parameter in the selects. but I was wondering if there was a different way to do this where I could tell the Select component to not re-run the options query after the initial page load.
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Pagination in select option
FilamentFFilament / ❓┊help
3y ago
Auto Select Issue in Select Option
FilamentFFilament / ❓┊help
6mo ago
Select All option in relationship Select
FilamentFFilament / ❓┊help
2y ago
re-rendering in custom page
FilamentFFilament / ❓┊help
3y ago