rappasoft / laravel-livewire-tables

A dynamic table component for Laravel Livewire
https://rappasoft.com/docs/laravel-livewire-tables/v2/introduction
MIT License
1.71k stars 320 forks source link

How to make a row clickable? #51

Closed frequentredundancy closed 3 years ago

frequentredundancy commented 3 years ago

I have certain rows that I want to be clickable (across the whole row), that redirects to a named route.

I don't want to edit the table blade directly since the route will change based on the table, and some tables wont be clickable at all.

How would I do about doing this? Thanks.

rappasoft commented 3 years ago

You can probably do it with the setTableRowAttributes method, but i'll give it a dedicated method in the next release.

rappasoft commented 3 years ago

https://github.com/rappasoft/laravel-livewire-tables/commit/09448e689ccc25f300fc2bd31049104f068915bb

It's crude but it will work.