© 2026 Hedgehog Software, LLC

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

ToggleColumn and Modal Confirmation (Action?)

Hi, I'm trying to understand how to make a modal appear when clicking on a field set as "ToggleColumn".

I also tried with
updateStateUsing()
updateStateUsing()
method ,
afterStateUpdated()
afterStateUpdated()
method,
beforeStateUpdated()
beforeStateUpdated()
method but I can't get the modal to appear:

                     
                Tables\Columns\ToggleColumn::make('monitorable')
                    ->label("É Monitorabile?")
                    ->onColor(fn ($record) => $record->monitorable ? 'success' : 'danger')
                    ->offColor('danger')
                    ->onIcon('heroicon-m-check')
                    ->offIcon('heroicon-m-x-mark')
                    ->alignment(Alignment::Center)
                    ->beforeStateUpdated(function () {
                        Action::make('updateMonitorablesNotes')
                        ->form([
                            Select::make('monitorable_notes')
                                ->label('Motivo Esclusione')
                                ->options([
                                ...
                                ...
                                ])
                                ->required(),   
                                ]);
                    }),
                     
                Tables\Columns\ToggleColumn::make('monitorable')
                    ->label("É Monitorabile?")
                    ->onColor(fn ($record) => $record->monitorable ? 'success' : 'danger')
                    ->offColor('danger')
                    ->onIcon('heroicon-m-check')
                    ->offIcon('heroicon-m-x-mark')
                    ->alignment(Alignment::Center)
                    ->beforeStateUpdated(function () {
                        Action::make('updateMonitorablesNotes')
                        ->form([
                            Select::make('monitorable_notes')
                                ->label('Motivo Esclusione')
                                ->options([
                                ...
                                ...
                                ])
                                ->required(),   
                                ]);
                    }),



Do you have any advice?
Thank you!
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

toggleColumn with confirmation modal
FilamentFFilament / ❓┊help
2y ago
Confirmation modal before action.
FilamentFFilament / ❓┊help
3y ago
ToggleColumn Action
FilamentFFilament / ❓┊help
3y ago
Require confirmation modal on submit action
FilamentFFilament / ❓┊help
2y ago