custom filter blade - cant figure out how

I have a custom page with query logic, and ultimately ends up in my view like this
<x-filament-panels::page>
<div class="mb-5 grid grid-cols-1 gap-4 sm:grid-cols-2">
<x-filament::input.wrapper prefix-icon="heroicon-m-magnifying-glass" class="w-full">
<x-filament::input type="search" wire:model.live.debounce.250ms="tableSearch" placeholder="Search..." />
</x-filament::input.wrapper>

</div>

@foreach($this->paginateTableQuery() as $key => $value)
I show my data here
$endforeach
<!-- Pagination controls -->
<div class="grid grid-flow-row-dense justify-center mt-3 w-full">
<!-- Pagination controls -->
<div class="grid grid-flow-row-dense justify-start mt-3 w-full">
<x-custom-pagination :paginator="$this->paginateTableQuery()" :searchTerm="$this->getTableSearch()" />
</div>
</div>

<!-- Keep the actual table for functionality but hide it visually -->
<div class="hidden">
{{ $this->table }}
</div>
</x-filament-panels::page>
<x-filament-panels::page>
<div class="mb-5 grid grid-cols-1 gap-4 sm:grid-cols-2">
<x-filament::input.wrapper prefix-icon="heroicon-m-magnifying-glass" class="w-full">
<x-filament::input type="search" wire:model.live.debounce.250ms="tableSearch" placeholder="Search..." />
</x-filament::input.wrapper>

</div>

@foreach($this->paginateTableQuery() as $key => $value)
I show my data here
$endforeach
<!-- Pagination controls -->
<div class="grid grid-flow-row-dense justify-center mt-3 w-full">
<!-- Pagination controls -->
<div class="grid grid-flow-row-dense justify-start mt-3 w-full">
<x-custom-pagination :paginator="$this->paginateTableQuery()" :searchTerm="$this->getTableSearch()" />
</div>
</div>

<!-- Keep the actual table for functionality but hide it visually -->
<div class="hidden">
{{ $this->table }}
</div>
</x-filament-panels::page>
I want to add the filters blade layout that would come from a table, but as its own standalone thing, but im just lost trying to find out what I need to include it based on the data the component accepts
3 Replies
toeknee
toeknee3w ago
Why not just override the view (We highly discourage this) and render in a blade with the data you need in that one place?
Jamie Cee
Jamie CeeOP3w ago
Kinda an odd situation as not entire showing the table, just using the traits to obtain the query and loop the data etc. I might just define an array of filters and just build at select fields. That might be easier 🤔
toeknee
toeknee3w ago
Why not just add the filters ontop instead?

Did you find this page helpful?