FilamentF
Filament15mo ago
Arjan

successNotificationTitle for table action is not showing

The successNotificationTitle for my (custom) action is not showing after the action has been successfully executed. Does anyone know why? This is my code:

 Tables\Actions\Action::make('Watchlist')
                        ->color('warning')
                        ->icon(MyWatchlistResource::getNavigationIcon())
                        ->successNotificationTitle('Project added to your watchlist')
                        ->action(function (Project $record) {
                            Watchlist::updateOrCreate([
                                'project_id' => $record->id,
                                'user_id'    => auth()->user()->id,
                            ]);
                        }),
Solution
you need to call
success
like
->action(function (Tables\Actions\Action $action) {
    // your action...

    $action->success();
})
Was this page helpful?