Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 48 additions & 1 deletion packages/tables/docs/02-columns/01-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -915,9 +915,18 @@ public function table(Table $table): Table
}
```

### Column Manager Actions

Filament Tables allows you to customize the placement of the **Reset** and **Apply** actions in the Column Manager. By default:

- The **Reset** action appears in the header.
- The **Apply** action appears in the footer.

You can change their positions using the corresponding methods.

#### Displaying the reset action in the footer

By default, the reset action appears in the header of the column manager. You may move it to the footer, next to the apply action, using the `columnManagerResetActionPosition()` method:
By default, the reset action appears in the header of the column manager. You may move it to the footer, using the `columnManagerResetActionPosition()` method:

```php
use Filament\Tables\Enums\ColumnManagerResetActionPosition;
Expand All @@ -933,6 +942,24 @@ public function table(Table $table): Table
}
```

#### Displaying the apply action in the header

By default, the apply action appears in the footer of the column manager. You may move it to the header using the `columnManagerApplyActionPosition()` method:

```php
use Filament\Tables\Enums\ColumnManagerApplyActionPosition;
use Filament\Tables\Table;

public function table(Table $table): Table
{
return $table
->columns([
// ...
])
->columnManagerApplyActionPosition(ColumnManagerApplyActionPosition::Header);
}
```

#### Disabling column persistence in the user's session

By default, Filament persists the table's columns by storing them in the user's session. To prevent persisting the columns in the user's session, use the `persistColumnsInSession(false)` method:
Expand Down Expand Up @@ -967,6 +994,26 @@ public function table(Table $table): Table
}
```

#### Displaying only column groups in the column manager

If your table contains a large number of columns organized into `ColumnGroup`, the column manager can become cluttered. You can use the `columnManagerGroupsOnly()` method to display only column group titles.

When enabled, users will not see individual columns in the column manager. Toggling a group will toggle the visibility of all columns within that group.

```php
use Filament\Tables\Table;

public function table(Table $table): Table
{
return $table
->columns([
// ...
])
->columnManagerGroupsOnly();
}

```

## Adding extra HTML attributes to a column content

You can pass extra HTML attributes to the column content via the `extraAttributes()` method, which will be merged onto its outer HTML element. The attributes should be represented by an array, where the key is the attribute name and the value is the attribute value:
Expand Down
Loading