MedicOneSystems / livewire-datatables

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

Fix issue: Column::callback(): Argument #1 ($columns) must be of type… #428

Closed code23-barna closed 2 years ago

code23-barna commented 2 years ago

Error message:

Column::callback(): Argument #1 ($columns) must be of type string, array given

Issue:

In src/Column.php:118 you set the type to "string" when it should be Array|String

code23-barna commented 2 years ago

To reproduce the issue use something like this in your columns() method:

 Column::callback(['id', 'title'], function ($id, $title) {
    return $id.': '.$title;
});