© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•6mo ago•
3 replies
Daniel

I can't select a value from the toggle buttons

my code:
ToggleButtons::make('available_days')
                            ->label('Dias Disponíveis')
                            ->helperText('Selecione os dias disponíveis para o profissional.')
                            ->live()
                            ->inline()
                            ->options(function (Get $get, Set $set, $livewire) {
                                if (blank($livewire->data['professional_type']) || blank($livewire->data['professional_id'])) {
                                    return [];
                                }
                                $professional = $livewire->data['professional_type']::find($livewire->data['professional_id']);
                                $availableDays = (new ProfessionalAvailabilityService($professional))->getAvailableDays();
                                $options =  $availableDays->mapWithKeys(function ($day) {
                                    return [$day => $day];
                                })->toArray();
                                dump($options);
                                return $options;
                            })
ToggleButtons::make('available_days')
                            ->label('Dias Disponíveis')
                            ->helperText('Selecione os dias disponíveis para o profissional.')
                            ->live()
                            ->inline()
                            ->options(function (Get $get, Set $set, $livewire) {
                                if (blank($livewire->data['professional_type']) || blank($livewire->data['professional_id'])) {
                                    return [];
                                }
                                $professional = $livewire->data['professional_type']::find($livewire->data['professional_id']);
                                $availableDays = (new ProfessionalAvailabilityService($professional))->getAvailableDays();
                                $options =  $availableDays->mapWithKeys(function ($day) {
                                    return [$day => $day];
                                })->toArray();
                                dump($options);
                                return $options;
                            })
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

Force select value based on a toggle option
FilamentFFilament / ❓┊help
11mo ago
Why can't you set the state of Toggle Buttons?
FilamentFFilament / ❓┊help
2y ago
Can I set default value of toggle?
FilamentFFilament / ❓┊help
3y ago
Select default value from select dropdown
FilamentFFilament / ❓┊help
17mo ago