remedix
Create a reusable Table Listing Livewire Component
Hi all,
I'm trying to create a reusable Filament Table using Livewire. I want to have this component 'TableListing' where I will pass it from my controller to a Livewire Component with parameters such as:
- The Form schema
- The Table columns
- The Model to query/update
So far i managed to do all that by calling something like
<livewire:table-listing :model="$jobModel" :columns="$jobColumns" :form="$jobForm" />
The listing works and the actions (on each row) work.
What does not work is the headerActions
where i have this:
The error comes AFTER i click on that header action. The error I get is invoked by the last line about the columns - which mind you it is working during the table listing rendering.
The exact error is:
Filament\Tables\Table::columns(): Argument #1 ($components) must be of type array, null given, called in [...]/laravel-base/app/Livewire/TableListing.php on line 37
So it seems that once the headerAction is clicked, a rerender is causing the $this->columns
to be set to null. Also please keep in mind that I defined these variables as private as it seems passing these as public were not even being rendered :
Any ideas on this ? Thank you!3 replies
Use metronic or any other admin panel with filament ?
Hi all, I'm getting into filament to replace a few zend framework custom apps i have that are using metronic as the admin panel. I'm still reading on filament but i'm trying to see how is it possible to incorporate a third party admin panel like metronic with filament. Is there a way to completely customize the look and feel of filament (not just tailwind colors)
12 replies