F
Filament11mo ago
Felix

filament Table main content goes under the footer.

Hello, I am working on an Livewire component with an filament table (made via: php artisan make:livewire-table) and I am adding an custom footer to it, but the table goes under the footer (the footer is added by: ->contentFooter()). so the order of the table is: Header -> Footer -> Table. and I can't find the solution in the docs. what am I doing wrong? the code: public function table(Table $table): Table { return $table ->heading('upcoming Projects') ->query(Project::query()) ->modifyQueryUsing(fn(Builder $query) => $query->where('project_date','>=', now())->take(4)) ->columns([ Tables\Columns\TextColumn::make('name'), Tables\Columns\TextColumn::make('project_date'), ]) ->actions([ Tables\Actions\Action::make('go to') ->url(fn (Project $record): string => route('project.show', ['id' => $record])) ]) ->contentFooter(\view('livewire.projects.footers.table-footer')) ->paginated(false); }
2 Replies
Felix
FelixOP11mo ago
this is the result. the header is on top, the footer (bekijk allemaal) is in the middle, and the table/content is on the bottom. (note: language is in dutch)
No description
jelmerkeij
jelmerkeij11mo ago
I was trying to work out the exact same thing. You need to put the content in the view in a <tr> for it to make it work. (Source: https://v2.filamentphp.com/tricks/custom-table-footer-displays-above-content - it's a v2 URL but still relevant)
Filament
Custom table footer displays above content by joaquin - Tricks - Fi...
Filament is a collection of tools for rapidly building beautiful TALL stack apps, designed for humans.
Want results from more Discord servers?
Add your server