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 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
v2.0.24

Fixed

  • Empty grid rows in the table filters panel — The v2.0.23 fix CSS-hides each header filter's Group inside the table's own filters form, but Filament's schema renderer wraps every top-level schema component in its own .fi-grid-col grid item, which still occupied a grid row (and a row-gap) per header filter. With several withHeaderFilter() columns, these empty rows pushed the "Apply filters" button down by a large, unexplained gap. New CSS rules — scoped to Filament's filters wrappers across every layout (dropdown, modal, and above/below/before/after-content) — now hide the empty .fi-grid-col wrapper too. No PHP changes, so removeTableFilter() keeps working as fixed in v2.0.23. (#5, thanks @x-adam)

Full Changelog: https://github.com/leek/filament-header-filters/compare/v2.0.23...v2.0.24

v2.0.23

Fixed

  • Filter indicator remove button was a no-op — Removing a header filter via the ✕ on its "Active filters" indicator badge never cleared the filter's state, so the filter (including any ->default()) could not be dismissed. Two causes: Filament caches the panel filters form in bootedInteractsWithTable() before the header filters are pushed onto the table, so removeTableFilter() looked the filter up in a schema that didn't contain it; and the panel-form groups for header filters were schema-hidden(), which also makes them invisible to getComponentByStatePath(). The panel filters form is now re-cached after header filters register, and their panel groups are CSS-hidden instead of schema-hidden so Filament can find and reset their fields.

Full Changelog: https://github.com/leek/filament-header-filters/compare/v2.0.22...v2.0.23

v2.0.22

What's Changed

Security and release-hygiene improvements:

  • CI workflowsrun-tests (PHP 8.2–8.4 × Laravel 11–13) and code-style (Pint), with all GitHub Actions pinned to commit SHAs
  • Security policy — added SECURITY.md with private vulnerability reporting instructions
  • Dependabot — weekly updates for Composer and GitHub Actions with a 7-day cooldown
  • Leaner dist archives.gitattributes export-ignore rules keep tests, CI config, and build tooling out of Composer installs

Full Changelog: https://github.com/leek/filament-header-filters/compare/v2.0.21...v2.0.22

v2.0.21

Fixed

  • Placeholder / value overlapping the chevron — In a narrow header column, a single-line select placeholder or value longer than the available width overflowed the button's reserved chevron padding and rendered under the dropdown caret. The value container now clips its overflow and the value label / placeholder ellipsise, so the text stays clear of the caret.
v2.0.20

Docs / metadata only — no code or behavior changes.

  • Add a More Filament plugins by Leek section to the README cross-linking the premium plugins (UI Plus, Workflow Engine, Decision Tables) and the free/open-source siblings.
  • Add relevant composer.json suggest entries pointing at companion plugins (sorted alphabetically).
v2.0.19

Fixed

  • Multi-select header filters now keep selected options visible in the dropdown with checkbox indicators, so selected values can be toggled off without using the selected-value badge.
  • Collapsed overflow badges now include a clear button on the +N badge to remove hidden selections.
  • Option rows and checkboxes now use pointer cursors on hover.
  • Responsive overflow recalculation now caches badge measurements and uses prefix sums to reduce repeated DOM measurement work during resize and Livewire morphs.
v2.0.18

Avoid redundant responsive badge overflow class writes so settled recalculation does not mutate already-correct containers.

v2.0.17

Avoid redundant responsive badge overflow count writes after the SPA navigation fix, making settled recalculation a no-op when the displayed overflow state is unchanged.

v2.0.16

Fix responsive multi-select badge overflow after Filament SPA navigation by reconnecting the shared measurement root and observers after Livewire swaps the document body.

v2.0.15

Measure candidate +N widths on cloned badges so recalculation does not mutate the live DOM.

v2.0.14

Avoid repeated no-op writes while recalculating responsive overflow badges.

v2.0.13

Allow count-only overflow badges when compact header filters do not have room for both a selected label and +N.

v2.0.12

Reserve the measured overflow badge width so compact header multi-select filters can display +N without clipping.

v2.0.11

Fix responsive overflow measurement by using a real offscreen badge clone so +N appears when header filter badges are clipped.

v2.0.10

Fix responsive multi-select header filter overflow stability and prevent the first visible badge from growing to fill the control.

v2.0.9

Fixed

  • Multi-select header filters now keep every selected badge that fits in the header control and collapse only true overflow into a badge-styled +N count.
  • The +N badge width is included during measurement so wider counts do not cause secondary overflow.
v2.0.8

Header filters stay applied after the table is rebuilt

Header-filter registration was gated by a once-per-request boolean flag, and the filters were pushed onto the table imperatively. When a consumer calls resetTable() — e.g. a page that re-renders the table after an external page filter or action changes — bootedInteractsWithTable() rebuilds the table from scratch and drops those pushed filters. The flag stayed true, so they never re-registered.

The result was a confusing bug: a header filter showed as selected but stopped actually filtering the table.

Fix

Registration is now tracked per Table instance via a WeakMap in HeaderFilterRegistry, rather than a component-level boolean. A rebuilt table is a new instance, so registration runs again and the filters are re-applied — while staying idempotent within a single render.

If you added a resetTable() workaround in your own page to force re-registration, you can drop it after upgrading.

v2.0.7

Multi-select header filters now render cleanly in narrow columns

Previously, selecting 2+ options in a multi-select header filter stacked a full-width badge per selection, wrapping each long label character-by-character and blowing up the row height.

The filter now collapses to a single line:

  • the column widens to fit (min-width: 16rem) when a multi-select carries a selection,
  • the first selection is shown ellipsised so it stays readable,
  • the remaining selections are summarized as a +N overflow count.

CSS-only — no API or behavior changes. Pull options still toggle individual selections from the dropdown.

v2.0.6

What's changed

  • Guard the column-search visibility check so hasHeaderFilters() is only called when the method or macro is actually registered, preventing errors on tables that don't use header filters (thanks @luca-alsina, #3).

Verification

  • php -d memory_limit=1G vendor/bin/pest
  • vendor/bin/pint --test
v2.0.4

What's changed

  • Register header filters after the Filament table is initialized, including custom HasTable pages where Livewire trait boot order differs.
  • Normalize seeded single-select header filter state so stale array values from previous multi-select usage do not render as blank selected values.

Verification

  • php -d memory_limit=1G vendor/bin/pest
  • vendor/bin/pint
v2.0.3
  • Refines header filter sizing so controls fill the header cell while retaining practical minimum widths.\n- Adds sizing support for multi-field date range header filters.\n- Removes the overflow override on Filament table scroll containers to avoid horizontal scroll position jumps when opening dropdowns.
v2.0.2

Fixed

  • Let the Filament wrapper stack inside header filters fill available width instead of shrink-wrapping with max-content.
  • Keeps the compact select trigger and dropdown panel minimum widths from v2.0.1.
v2.0.1

Fixed

  • Set the closed select trigger minimum width to 4rem.
  • Set the dropdown panel minimum width to 12rem while keeping the viewport cap.
v2.0.0

Changed

  • Header filter CSS is now imported by the consuming app panel theme.
  • The documented import path is now vendor/leek/filament-header-filters/resources/css/filament-header-filters.css.
  • Removed the generated resources/dist stylesheet and package-local Vite build files.

Upgrade

Add the package stylesheet to your Filament panel theme after the Filament theme import, then rebuild your app assets with npm run build.

v1.0.2

Changed

  • Let header filter cells size from table content instead of forcing a fixed cell width.
  • Shrink-wrap Filament select wrappers while keeping a 12rem minimum for select controls.
  • Set header select dropdown panels to content width with a 4rem minimum and viewport cap.
v1.0.1

Vite-built CSS sources (package.json, vite.config.js, resources/css, resources/js), refreshed dist CSS, art update, .gitignore for /.claude, minor pint cleanup of the trait. No API changes.

v1.0.0

First stable release.

Features

  • ->headerFilter(BaseFilter $filter) on any table column. Accepts SelectFilter, Filter, and any BaseFilter subclass.
  • Shared state with panel filters (tableFilters). Indicators, reset, and session persistence work.
  • Always live — applies immediately regardless of deferFilters().
  • Auto-hidden field labels — column header serves as the label.
  • Hidden columns' filters are skipped from the query.

Requirements

  • PHP 8.2+
  • Filament v4.x or v5.x

Install

composer require leek/filament-header-filters

Add the HasHeaderFilters trait to any Livewire component using InteractsWithTable:

use Leek\FilamentHeaderFilters\Concerns\HasHeaderFilters;

class ListOrders extends ListRecords
{
    use HasHeaderFilters;
}

See README for dropdown, min/max, and date range examples.

Free port of filamentphp/filament#19432.

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.
besmartand-pro/php-quality-config
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
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