Method Filament\Tables\Columns\ToggleColumn::afterStateUpdated does not exist.

I need to make an action when i toggle and i saw the hook in the documentation but it didn't work and I don't know why. Here is my code :
ToggleColumn::make('is_online')
->afterStateUpdated(function ($record, $state) {
$this->togglePublish($record);
}),
ToggleColumn::make('is_online')
->afterStateUpdated(function ($record, $state) {
$this->togglePublish($record);
}),
1 Reply
Dennis Koch
Dennis Koch13mo ago
I think the hook is for forms, not columns. But there is saveStateUsing() I think
Want results from more Discord servers?
Add your server