MedicOneSystems / livewire-datatables

Advanced datatables using Laravel, Livewire, Tailwind CSS and Alpine JS
https://livewire-datatables.com/
MIT License
1.19k stars 259 forks source link

Feature Request: Row click action #615

Open nickolasjadams opened 5 months ago

nickolasjadams commented 5 months ago

It's possible to add a link to a column. But you have to call the method off a column.

In simple use cases, there are no columns to call that method on because we just create the datatable with a simple tag.

<livewire:datatable
        model="App\Models\Thing"
        ...
/>

The extra amount of work just to add a link to a row is more than I hoped for.

What if we could do this

<livewire:datatable
        model="App\Models\Thing"
        rowLink="thing/{id}"
        ...
/>

I could work on this feature, but I'd like feedback on whether it would be welcomed or if the creators would like it done in a different way.

Thanks for the great package!

arm092 commented 4 months ago

You can do it for my forked version if you want, create PR, and I will check, approve and merge it. And we will have this feature in the next release.

https://github.com/arm092/livewire-datatables

arm092 commented 4 months ago

But how should work editable cells in the table in this case?