Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Filament Header Filters

Filament Header Filters Laravel Package

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+.

View on GitHub
Deep Wiki
Context7

Inline header filters for Filament tables

Frequently asked questions about Filament Header Filters
How do I add inline filters to Filament table columns without breaking existing functionality?
Use the `HasHeaderFilters` trait on your Livewire component (e.g., `ListRecords`) and call `->headerFilter()` on any column. The package integrates seamlessly with Filament’s existing `BaseFilter` system, so no existing filters or table logic will break. Just attach filters to columns where needed.
Does this package support Filament v5 and v4, or should I wait for v6 compatibility?
This package explicitly supports Filament v4 and v5. While it’s not yet tested for v6, the architecture is designed to minimize upgrade friction. Monitor the package’s issue tracker or Filament’s roadmap for compatibility announcements before upgrading.
Can I use custom BaseFilter subclasses with headerFilter()?
Yes, the package supports any `BaseFilter` subclass, including Filament’s built-in filters (e.g., `SelectFilter`, `DatePicker`) and fully custom schemas. Just ensure your filter extends `BaseFilter` and implements the required methods like `query()`. Test with your custom filters to confirm they render and apply as expected.
What happens if I apply a header filter to a hidden column? Will it still work?
Filters on hidden columns are automatically skipped to avoid unnecessary queries or UI clutter. This is intentional behavior, but it may surprise developers expecting all filters to apply. Document this in your team’s conventions or use conditional logic to show/hide filters dynamically.
Do I need Vite/NPM to use this package, or can I manually include the CSS?
The package requires Vite/NPM for CSS integration during development, but you can manually include the CSS as a fallback if your team doesn’t use these tools. Add the stylesheet directly to your layout or use an inline `<style>` tag with the compiled CSS from `resources/css/filament-header-filters.css`.
How do header filters interact with Filament’s panel filters (e.g., reset buttons, session persistence)?
Header filters share state with panel filters via `$tableFilters`, ensuring consistency in reset functionality, filter indicators, and session persistence. This means users can reset all filters (including header filters) from the panel’s filter UI, and filter states will persist across page reloads.
Are there any known edge cases with multi-select filters or rapid filter toggling?
While v2.0.4 addresses stale state for single-select filters, complex multi-select transitions (e.g., rapid toggling between single/multi-select modes) might still surface issues. Test with real-world workflows like ‘filter by status → clear → filter by date’ to catch edge cases early.
Will this package work with Laravel Mix instead of Vite?
The package is designed for Vite, but you can adapt it for Laravel Mix by manually compiling the CSS or using a fallback approach. Ensure the compiled CSS is included in your assets pipeline, and rebuild after installation. Check the package’s documentation for any Mix-specific adjustments.
How do I style header filters to match my custom Filament theme?
The package provides override hooks in its CSS. Use BEM classes or `!important` overrides to target specific styles if conflicts arise. For example, adjust dropdown `z-index` or cell sizing by extending the package’s CSS variables or targeting its classes directly.
Is there a performance impact when using header filters on large tables?
Header filters apply the same query logic as Filament’s native filters, so performance depends on your database and filter complexity. Avoid overly broad filters (e.g., unbounded date ranges) and test with realistic datasets. The package doesn’t introduce additional overhead beyond standard Filament filtering.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky