© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
7 replies
Jamie Cee

Updating state after filtering

Cant find out if it's currently possible, where after filtering, I update the state and tooltip of values.

                Filter::make('languages')
                    ->form([
                        Select::make('locale')
                            ->options(Locales::all()->pluck('title', 'locale'))
                            ->selectablePlaceholder(false),
                    ])
                    ->query(function (Builder $query, array $data): Builder {
                        return $query
                            ->when(
                                $data['locale'],
                                function (Builder $query, $state) {
                                    if ($state == null || $state == "en") {
                                        return $query;
                                    }
                                    return $query->whereHas('locales', fn (Builder $query) => $query->where('locales_offer.locale', $state));
                                }
                            );
                    }),
                Filter::make('languages')
                    ->form([
                        Select::make('locale')
                            ->options(Locales::all()->pluck('title', 'locale'))
                            ->selectablePlaceholder(false),
                    ])
                    ->query(function (Builder $query, array $data): Builder {
                        return $query
                            ->when(
                                $data['locale'],
                                function (Builder $query, $state) {
                                    if ($state == null || $state == "en") {
                                        return $query;
                                    }
                                    return $query->whereHas('locales', fn (Builder $query) => $query->where('locales_offer.locale', $state));
                                }
                            );
                    }),


When I filter a different language, I want to update the fields with the translations, and add a tooltip with the originals
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

Updating state after using $set()
FilamentFFilament / ❓┊help
3y ago
State not updating
FilamentFFilament / ❓┊help
2y ago
Viewfield not updating state
FilamentFFilament / ❓┊help
2y ago
Liveware inputs not updating state
FilamentFFilament / ❓┊help
3y ago