F
Filament12mo ago
Vp

Toggle column with confirmation

Can we show confirmation modal when table toggle is changed? I want the confirmation to pop-up when I try to toggle column and based on that it should reflect the status What I tried: I thought this link https://filamentphp.com/docs/3.x/tables/columns/toggle#lifecycle-hooks should do the trick, but I am stucking here My code:
use Filament\Actions\Action;

Tables\Columns\ToggleColumn::make('is_verified')
->beforeStateUpdated(function ($record, $state) {
Action::make('confirm')
->requiresConfirmation();

dd($record);
}),
use Filament\Actions\Action;

Tables\Columns\ToggleColumn::make('is_verified')
->beforeStateUpdated(function ($record, $state) {
Action::make('confirm')
->requiresConfirmation();

dd($record);
}),
It always shows dd() value instead of action, thanks in advance
Solution:
I used all the action I can find and none of them are working, so I think it's not possible to open Confirmation/Action from toggle column
Jump to solution
2 Replies
Vp
VpOP12mo ago
bump
Solution
Vp
Vp12mo ago
I used all the action I can find and none of them are working, so I think it's not possible to open Confirmation/Action from toggle column
Want results from more Discord servers?
Add your server