Skip to content

Fixing search and filter styling to match Filament table layouts#109

Open
Luckcatcher wants to merge 1 commit intorelaticle:3.xfrom
Luckcatcher:3.x
Open

Fixing search and filter styling to match Filament table layouts#109
Luckcatcher wants to merge 1 commit intorelaticle:3.xfrom
Luckcatcher:3.x

Conversation

@Luckcatcher
Copy link
Copy Markdown

Fixes filter styling in v3 to match Filament tables, justified to the right.

The diff shows a lot of changes which are just the result of adding a wrapper div in $hasHeaderToolbar. The only real changes are this wrapper div, moving "fi-ta-header-toolbar px-0" classes into the wrapper div, and moving the search to be before the filter. It also needs a dummy div, explained in the code.

Tested with all FiltersLayout types.

Before:
layoutbefore

After:
layoutafter

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the table filters/search header toolbar markup so the search + filter trigger align/styling matches Filament table layouts (right-justified), including reordering the search before the filters trigger UI.

Changes:

  • Wraps the header toolbar contents in an additional container to align with Filament’s expected DOM structure.
  • Reorders the search field to render before filter dialog/trigger elements.
  • Adds a placeholder element to satisfy nth-child(2)-based header toolbar styling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +121 to +125
<div class="fi-ta-header-toolbar px-0">
<div>
{{-- fi-ta-header-toolbar has an nth-child(2) styling that assumes an actions divs here and needs an element before any other search or filter elements --}}
</div>
<div class="items-center gap-x-4">
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new toolbar markup drops the flex items-center gap-x-4 mb-4 utility classes that previously ensured horizontal alignment and spacing between the toolbar and the table content. If fi-ta-header-toolbar isn’t guaranteed (by Filament CSS) to provide these styles, the search/filters UI may stack vertically and/or sit flush against the content. Consider restoring equivalent flex + gap + bottom spacing either on fi-ta-header-toolbar or on the inner container (and ensure the container that holds the search/dropdown is display: flex).

Suggested change
<div class="fi-ta-header-toolbar px-0">
<div>
{{-- fi-ta-header-toolbar has an nth-child(2) styling that assumes an actions divs here and needs an element before any other search or filter elements --}}
</div>
<div class="items-center gap-x-4">
<div class="fi-ta-header-toolbar mb-4 px-0">
<div>
{{-- fi-ta-header-toolbar has an nth-child(2) styling that assumes an actions divs here and needs an element before any other search or filter elements --}}
</div>
<div class="flex items-center gap-x-4">

Copilot uses AI. Check for mistakes.
>
<div class="fi-ta-header-toolbar px-0">
<div>
{{-- fi-ta-header-toolbar has an nth-child(2) styling that assumes an actions divs here and needs an element before any other search or filter elements --}}
Copy link

Copilot AI Apr 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment has a small grammar issue: “assumes an actions divs here” should be “assumes an actions div here” (or “assumes an actions div is here”).

Suggested change
{{-- fi-ta-header-toolbar has an nth-child(2) styling that assumes an actions divs here and needs an element before any other search or filter elements --}}
{{-- fi-ta-header-toolbar has an nth-child(2) styling that assumes an actions div is here and needs an element before any other search or filter elements --}}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants