coryrose1 / livewire-tables

An extension for Laravel Livewire that allows you to effortlessly scaffold datatables with optional pagination, search, and sort.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Action links and buttons

coryrose1 opened this issue · comments

Starting a discussion on handling action links and buttons within the table.

There are essentially two ways to handle this... by letting the user modify the HTML and add a column header / button themselves, or by allowing the button/link to be built via the scaffold command.

There are many challenges for building this into the scaffolding command.

1. Do we extend $fields, or add an $actions array?

Will "actions" ever need to modify the base query?

Do we need to comb through $fields for actions vs data cells, or if we use an $actions array, how do we determine the order of columns for the overall table?

2. How is the action link href built

Assuming this will comprise of some primary key, or field value that needs to already be present in $rowData. What happens if there are variables (even multiple) in the link?