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

Technical Evaluation

Architecture Fit

  • Filament Ecosystem Alignment: Remains tightly integrated with Filament v4/v5, with explicit fixes for custom HasTable pages where Livewire trait initialization order caused filter registration issues. This resolves a critical edge case for advanced Filament implementations.
  • State Management: Addresses a stale state bug in single-select filters (previously retaining array values from multi-select usage), improving consistency and reducing UX friction.
  • Column-Level Granularity: Unchanged—still enables per-column filtering without global search interference, ideal for data exploration.
  • Livewire Compatibility: Fixes boot order dependencies, ensuring filters work reliably in all Livewire contexts (e.g., custom table pages).

Integration Feasibility

  • Lower Friction for Custom Tables: The fix for HasTable pages reduces integration complexity for non-standard Filament resources.
  • Backward Compatible: No breaking changes to existing filter configurations; updates are opt-in via normal dependency updates.
  • Filament Version Lock: Still v4/v5-only; v6+ compatibility remains untested.

Technical Risk

  • Boot Order Sensitivity: While fixed, custom Livewire components with non-standard initialization may still require manual testing.
  • State Bug Residuals: The stale state fix targets single-select filters; multi-select filters may need validation for edge cases (e.g., rapid toggling).
  • Asset Pipeline: No changes, but Vite/NPM rebuilds remain mandatory post-update.
  • Testing Coverage: Pest tests added, but real-world edge cases (e.g., deeply nested tables) may still exist.

Key Questions

  1. Boot Order Edge Cases: Are there other Livewire contexts where filter registration might fail (e.g., composite components)?
  2. State Persistence: How does the fix handle concurrent filter updates (e.g., user toggles multiple filters rapidly)?
  3. Multi-Select Stability: Does the stale state fix fully resolve multi-select → single-select transitions?
  4. Performance Impact: Does the new registration logic add measurable overhead to table initialization?
  5. Testing Scope: What specific edge cases were covered by the Pest tests (e.g., polymorphic relationships, eager-loaded filters)?
  6. Future-Proofing: Will v2.x maintain compatibility with Filament v6 when released, or are breaking changes likely?

Integration Approach

Stack Fit

  • Primary Use Case: Expanded to include custom HasTable pages and complex Livewire setups (e.g., modular admin panels).
  • Tech Stack Synergy:
    • PHP 8.2+: Required for trait boot order fixes (e.g., ::class string handling).
    • Livewire: Boot order patch ensures consistent initialization across all components.
    • Vite/NPM: Unchanged; asset pipeline remains critical.
  • Anti-Patterns: Still avoid for:
    • Non-Filament apps.
    • Projects requiring server-side-only filtering (e.g., GraphQL APIs).

Migration Path

  1. Pre-Installation:
    • Audit Filament version (composer show filament/filament).
    • Verify PHP 8.2+ and custom HasTable usage.
  2. Update:
    composer update leek/filament-header-filters --with-dependencies
    npm run build  # Rebuild assets
    
  3. Validation:
    • Test custom table pages (previously broken).
    • Verify single-select filters no longer show stale state.
  4. Usage:
    • Existing configurations remain unchanged; new fixes apply automatically.

Compatibility

  • Filament v4/v5: Fully supported with boot order fixes.
  • Custom Tables: Now works with any HasTable implementation, including third-party packages.
  • Third-Party Filters: Unchanged; still compatible with Filament’s built-in filters.
  • Legacy Systems: No support for Filament v3 or earlier.

Sequencing

  1. Phase 1: Update in a staging environment with custom table pages.
  2. Phase 2: Validate filter state transitions (single ↔ multi-select).
  3. Phase 3: Roll out to production with monitoring for boot order issues.
  4. Phase 4: Optimize if performance regressions are detected (e.g., table load times).

Operational Impact

Maintenance

  • Dependency Updates:
    • Monitor for Filament v6 compatibility (if released).
    • Update alongside Filament minor/patch versions (v2.x series).
  • Customization:
    • Override CSS/JS as before; no changes to public API.
    • Extend BaseFilter for project-specific logic (e.g., dynamic options).
  • Debugging:
    • Use Livewire logs for boot order issues.
    • Check for stale state in single-select filters post-update.

Support

  • Documentation: No updates yet; custom table usage should be highlighted.
  • Community: Still low adoption; direct maintainer outreach may be needed for edge cases.
  • Error Handling:
    • Filters should now handle boot order failures gracefully.
    • Validate state transitions in QA (e.g., multi-select → single-select).

Scaling

  • Performance:
    • Boot Order Fix: Minimal impact; registration is deferred until table init.
    • State Management: Reduced UI jank from stale values.
    • Large Datasets: Test with pagination and lazy loading as before.
  • Concurrency: Filters remain isolated per column; no regressions expected.
  • Caching: Leverage Filament’s query caching for filtered results.

Failure Modes

Failure Scenario Impact Mitigation
Boot order conflicts (new contexts) Filters fail to register Test all custom Livewire components.
Stale state residuals Single-select filters show old values Validate state transitions in QA.
Asset build failures Missing styles Automate npm run build in CI/CD.
PHP 8.2+ incompatibility Installation fails Downgrade or upgrade project dependencies.
Concurrent state corruption Unpredictable filter behavior Test rapid filter toggling scenarios.

Ramp-Up

  • Developer Onboarding:
    • 1 hour: Update package and validate fixes.
    • 2–4 hours: Test custom tables and state transitions.
  • UX Training:
    • End users may still need training on filter state behavior (e.g., single vs. multi-select).
  • Testing Checklist:
    • Verify custom HasTable pages load filters correctly.
    • Test single-select stale state (e.g., toggle between multi/single).
    • Confirm accessibility (keyboard, screen readers) unchanged.
    • Validate performance with large datasets.
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.
daikazu/eloquent-salesforce-objects
unseen-codes/chat
romalytar/yammi-jobs-monitoring-laravel
kisame76/filament-db-table-state
nqxcode/laravel-lucene-search
dpfx/laravel-livewire-wizards
workos/workos-php-laravel
sofa/laravel-global-scope
nawasara/auth-primitives
adhocrat-io/arkhe-main
make-dev/orca-harpoon
itsemon245/lamet
baks-dev/dashboard
amoifr/pickle-panther-bundle
make-dev/orca
dmstr/symfony-system-resources-bundle
dmstr/symfony-job-queue-bundle
dmstr/openapi-json-schema-bundle
dmstr/keycloak-security-bundle
dmstr/doctrine-audit-log-bundle