arm092 / livewire-datatables

Advanced datatables using Laravel, Livewire, Tailwind CSS and Alpine JS (Fork of MedicOneSystems/livewire-datatables but with updating dependencies and support new Laravel versions in time)
https://livewire-datatables.com/
MIT License
25 stars 11 forks source link

How call datatable in blade view? #5

Closed stojankukrika closed 9 months ago

stojankukrika commented 9 months ago

Hi, Thanks for the update on livewire 3. Finally, someone made it!

I have two questions:

  1. How to call a table in blade view? In the forked package, it was .?
  2. How to call a table with forward params? In forked version it was something like id/>

https://github.com/MedicOneSystems/demo-livewire-datatables/blob/master/resources/views/complex.blade.php#L7

Regards, SK

arm092 commented 9 months ago

It should work as described in the docs. And it is the same way as in old version.

arm092 commented 9 months ago

It should be <livewire:datatables.team-table :param="$something"/> for newly created datatables in App\Livewire\Datatables\ directory

stojankukrika commented 9 months ago

It may work, but it didn't work without a model defined. I get this error: "Typed property Arm092\LivewireDatatables\Livewire\LivewireDatatable::$model must not be accessed before initialization" even though I have columns and builder methods. And when I add the model, it reads only columns from this model, not from the builder :(

arm092 commented 9 months ago

Try to update