© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
5 replies
NoxyArg

Repeater Duplicate queries when adding new item

My question is the following, why? when you add a new item to the repeater it executes the ->visible in all the previously added items, this causes the queries to be duplicated.

Forms\Components\Repeater::make('invoiceItems')
                    ->relationship()
                    ->schema([
                        Forms\Components\Group::make() // 
                            ->schema([
                                Select::make('categories'),
                                Select::make('article_id'),
                                Select::make('glass')
                               ->visible(fn (Get $get): bool => Article::where('id', $get('article_id'))->where('is_kit', '!=', '0')->exists()),
Forms\Components\Repeater::make('invoiceItems')
                    ->relationship()
                    ->schema([
                        Forms\Components\Group::make() // 
                            ->schema([
                                Select::make('categories'),
                                Select::make('article_id'),
                                Select::make('glass')
                               ->visible(fn (Get $get): bool => Article::where('id', $get('article_id'))->where('is_kit', '!=', '0')->exists()),


Tnx !
image.png
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

Duplicate Queries in Repeater with Relationship
FilamentFFilament / ❓┊help
2y ago
Repeater add new item
FilamentFFilament / ❓┊help
3y ago
Duplicate queries
FilamentFFilament / ❓┊help
2y ago
get new repeater item only filament when editing
FilamentFFilament / ❓┊help
3y ago