© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
4 replies
DianaMujoiu

Select in repeater

Hello everyone
I have this select component in a repeater
                  Select::make('work_point_id')
                                            ->reactive()
                                            ->afterStateUpdated(function ($state, Set $set){
                                                $workPoint = WorkPoint::find((int) $state);

                                                if ($workPoint) {
                                                    $set('alias',$workPoint->alias);
                                                    $set('name',$workPoint->name);
                                                    $set('county',$workPoint->county);
                                                    $set('city',$workPoint->city);
                                                    $set('street',$workPoint->street);
                                                    $set('number',$workPoint->number);

                                                }
                                            })
                                            ->options(function (Get $get, $state) {
                                                return WorkPoint::where('company_id', $get('../../company_id'))
                                                    ->pluck('name', 'id');
                                            })
                                            ->label(__('app.resources.work_points.selected_work_point')),
                  Select::make('work_point_id')
                                            ->reactive()
                                            ->afterStateUpdated(function ($state, Set $set){
                                                $workPoint = WorkPoint::find((int) $state);

                                                if ($workPoint) {
                                                    $set('alias',$workPoint->alias);
                                                    $set('name',$workPoint->name);
                                                    $set('county',$workPoint->county);
                                                    $set('city',$workPoint->city);
                                                    $set('street',$workPoint->street);
                                                    $set('number',$workPoint->number);

                                                }
                                            })
                                            ->options(function (Get $get, $state) {
                                                return WorkPoint::where('company_id', $get('../../company_id'))
                                                    ->pluck('name', 'id');
                                            })
                                            ->label(__('app.resources.work_points.selected_work_point')),
When I add a new item to a repeater, I need the options in the select to exclude those already selected in other items. How can I do this?
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 Dependency in an Repeater
FilamentFFilament / ❓┊help
2y ago
Select on repeater
FilamentFFilament / ❓┊help
10mo ago
Repeater relationship select
FilamentFFilament / ❓┊help
13mo ago
Populating Repeater Select Dropdown
FilamentFFilament / ❓┊help
3y ago