nalletje/livewire-tables
Build Bootstrap 5 tables in Laravel Livewire with query-based data, search, filters, row actions, actions with forms, route buttons, and column transforms. Optional Spatie permissions and Font Awesome support.
Adding browser native date and time fields to use in forms with limited options
Added livewire 4
Fix for unchecking rows for a action
Quickfix for relation columns
[fix] Added use statement to when query
[removed] Collected & Collected pages [fix] Weird behaviour of selecting/deselecting rows to execute actions
[ui] Changed default behaviour of the loader [ui] Deleted show/hide filter [ui] Added filters to new dropdown "settings" [ui] Added text "showing x to x..."
[ui] Loader changes
[removed] Useless throw of a exception, since already type-casted to array [add] target option to row button
[add] Added a function to overwrite button routeparams in tables
Use Example
Column::make('id', "") ->sortable(false) ->searchable(false) ->buttons([[ 'icon' => 'fas fa-edit', 'route' => your-route', 'permission' => 'your-permission' ]]) ->routeparams([ 'document' => $this->your_document_id, 'version' => null ], 'version'),
This will replace the version key in route parameters with the ID from the query results
[drop] Support for Livewire 2 >= [add] Support for Livewire 3 >= [changes] Changed the way action and button forms where handled and build to comply livewire 3
livewire v3
[bugfix] called wrong closing event with button form modals
Fixed a situatie where not all form fields where returned if not validated
Breaking change: You can not create a button on the fly, you need to build a class for it. See the _examples folder for more information
Added: Added a new feature to create a button with a form, so you don't need a additionally create page anymore.
[fix] added maps to check auth functions for actions, buttons and filters
Added actions with form possibility.
There are breaking changes for Actions, the handle function returns a Message object now instead of a string
` function handle(Collection $collection, array $form): Message { $fails = false;
$collection->each(function (Model $model) {
// DO YOUR STUFF
});
if ($fails) {
return Message::make('Something went wrong', 'danger');
}
return Message::make('Action is executed without errors', 'success');
}
`
Added a loader, some refactors
You can enable/disable the loader with
public bool $loader = true;
You can now add all visible rows on the page with one click to your selection
Added a way to manipulate column value data
Column::make('field', trans('Label'))->transform(static function ($val) { return number_format($val, 0, ',', '.')."%"; })
Alpha release
How can I help you explore Laravel packages today?