Add Button Action To TextColumn

Problem:
Right now, in the events table, my users want to click the row to go to the edit page of the record.
But there is a problem.
I have this TextColumn, which has a url. So if the user clicks the row, but not clicking the text, it opens the TextColumn url.
Tables\Columns\TextColumn::make('user.name')->url(function (Event $record): string {
    return route('filament.admin.resources.users.edit', $record->user_id);
}),

So is confusing, because they havent clicked the text of that TextColumn, therefore they don't want to navigate to that TextColumn url, they want to navigate to edit the specified record.

What I want:
So i want to instead of all the TextColumn space, create a button inside of it, so it is clear that if the user clicks the button will go where the button points to. otherwise, will go to edit the clicked row.

What I tried:
I tried to change the ->url for ->action:
Tables\Columns\TextColumn::make('user.name')->action(Tables\Actions\Action::make('view_user')->url(function (Event $record): string {
    return route('filament.admin.resources.users.edit', $record->user_id);
})),

But then, when i click it, it doesn't do anything. If i instead of ->url I put:
->action(function () {
    dd('hi');
})

but is not visible

Question:
Is there a way, without creating a custom col, to add an action in the textcolumn, making it visible & also making the ->url action to work?
Solution
Maybe this works as an alternative for you:
->description(fn () => new HtmlString('<a class="hover:underline" href="test">» Go to page</a>'))
image.png
Was this page helpful?