leek/filament-header-filters
Add inline filters to Filament table column headers. Attach any BaseFilter (selects, date pickers, min/max ranges, custom schemas) as a richer alternative to individual searchable fields. Works with Filament v4/v5, PHP 8.2+.
Architecture Fit
BaseFilter and InteractsWithTable abstractions, ensuring seamless integration with Filament’s table system (v4/v5). The HasHeaderFilters trait and view overrides (filament-tables::index) demonstrate a low-friction extension point for Filament’s core functionality.headerFilter() and filter-level columnName() macros provide a declarative, column-specific approach, aligning with Filament’s pattern of attaching behaviors to table components. This avoids global state pollution and keeps filters scoped to their columns.$tableFilters), ensuring consistency in filter indicators, reset functionality, and session persistence. This reduces cognitive load for users familiar with Filament’s panel filters.Integration Feasibility
composer require with no runtime conflicts (PHP 8.2+ and Filament v4/v5 are the only hard requirements). The package’s MIT license and active maintenance (last release: July 2026) reduce adoption risk.HasHeaderFilters trait requires minimal boilerplate (one use statement per Livewire component). This is lower overhead than event listeners or service providers for enabling header filters.npm run build). This is a standard Filament pattern (e.g., theme customization) and doesn’t introduce build complexity.BaseFilter subclass, including Filament’s built-in filters (SelectFilter, DatePicker) and custom schemas. This future-proofs the package against new Filament filter types.Technical Risk
!important overrides or BEM classes for targeting).Key Questions
<style> tag).BaseFilter subclasses in use that might not work with headerFilter()? If so, which ones?Stack Fit
BaseFilter::query() method.Migration Path
composer require leek/filament-header-filters.HasHeaderFilters trait to target Livewire components (e.g., ListRecords pages).vite.config.js or resources/css/app.css to import the package’s stylesheet after Filament’s theme:
@import 'filament/filament/resources/css/theme.css';
@import 'leek/filament-header-filters/resources/css/filament-header-filters.css';
npm run build (or dev for local testing).searchable(isIndividual: true) with headerFilter(BaseFilter) on target columns.TextColumn::make('status')
->badge()
->headerFilter(
SelectFilter::make('status')
->options(OrderStatus::class)
);
->filtersLayout(FiltersLayout::Hidden)
deferFilters() dependency).Compatibility
BaseFilter subclasses should work but may need columnName() macro if not using Filament’s built-in filters. Mitigation: Document custom filter requirements.Sequencing
Orders or Users).How can I help you explore Laravel packages today?