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.
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
:
But then, when i click it, it doesn't do anything. If i instead of ->url
I put:
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:Jump to solution
Maybe this works as an alternative for you:
->description(fn () => new HtmlString('<a class="hover:underline" href="test">Β» Go to page</a>'))
...6 Replies
bump
I don't think that feature exists yet. Action always are used for the whole cell.
Solution
Maybe this works as an alternative for you:
->description(fn () => new HtmlString('<a class="hover:underline" href="test">Β» Go to page</a>'))
u mean it will exist? someone is working on it?
π
Nope. I mean: Nobody cared enough to PR it π
π
its fine, thanks dennis ^^