Row Action Issue: Incorrect Record Selection

Hello everyone, I hope you can assist me with a behavior issue I'm encountering when using a row action.

What I am trying to do: I want to retrieve the current record when I click the button.

What I did: I created a simple row action.

My issue/the error: When I click the buttons, it fetches a different record instead of the selected one. Strangely, it seems to send the correct ID when posting, and the ID shown in the tooltip is as it should be.

Code:
->actions([
    Tables\Actions\Action::make('AssignToMe')
        ->label('Take ownership of this request')
        ->tooltip(function ($record) {
            return 'customer id => ' . $record->id;
        })
        ->button()
        ->outlined()
        ->color('success')
        ->icon('heroicon-s-user')
        ->action(function (Customer $customer) {
            Notification::make()
                ->title("customer id => {$customer->id}")
                ->send();
        }),
])
Screenshot_from_2023-11-06_13-48-19.png
Was this page helpful?