Filter above custom page HasTable

How can I place filters above the table on a custom page? I tried these two but it doesn't work:
use Filament\Tables\Enums\FiltersLayout;

protected function getTableFiltersLayout(): FiltersLayout
{
return FiltersLayout::AboveContent;
}
use Filament\Tables\Enums\FiltersLayout;

protected function getTableFiltersLayout(): FiltersLayout
{
return FiltersLayout::AboveContent;
}
and
protected function getFiltersLayout(): FiltersLayout
{
return FiltersLayout::AboveContentCollapsible;
}
protected function getFiltersLayout(): FiltersLayout
{
return FiltersLayout::AboveContentCollapsible;
}
Solution:
Is this still v2? Or did you just not update the syntax?
Jump to solution
7 Replies
DrByte
DrByte14mo ago
Does it work if you simply set the filter position directly on your $table definition? https://filamentphp.com/docs/3.x/tables/filters#displaying-filters-below-the-table-content
H.Bilbao
H.BilbaoOP14mo ago
I just tried it on a resource table and it doesn't work
Dennis Koch
Dennis Koch14mo ago
Can you share the code you used?
H.Bilbao
H.BilbaoOP14mo ago
Gist
Filter above custom page HasTable
Filter above custom page HasTable. GitHub Gist: instantly share code, notes, and snippets.
Solution
Dennis Koch
Dennis Koch14mo ago
Is this still v2? Or did you just not update the syntax?
H.Bilbao
H.BilbaoOP14mo ago
It is v3, I will check if it is a syntax issue After update the syntax is ok the filter, thanks
Want results from more Discord servers?
Add your server