kdion4891/laravel-livewire-tables

Make row clickable

Opened this issue · 1 comments

This is an amazing package, it's very handy - one thing I feel would be a great advantage would be to be able to make the row clickable to go to the relevant record.

Is this something potentially in the pipeline, or is there a workaround?

My current work around for this is to create a view with a href/button with an action, make a column with view in it and pass any variables needed through to the view.

<--- Table.php --->
Column::make('someNameColumn')->view('viewable'),

<---Viewable.blade.php--->
<a href="{{your route or view here, $model->id, $model->title etc etc}}"> View Item </a>

Something along these lines is my current work around. Certainly not elegant but it gets the job done.