MedicOneSystems / MedicOneSystems/livewire-datatables

Feature Request: Row click action

Open
#615 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
1.2k
Forks
257
PR merge metrics
No merged PRs in 30d

Description

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!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the livewire:datatable entry point and review how links are currently added through columns. Confirm how a row's model id is available for URL generation, then define completion as supporting the proposed rowLink attribute for simple datatable usage with working navigation for each row.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.