# ToolbarCollectionState

**Category:** Common/State

## API

### Overview

`ToolbarCollectionState` manages the toolbar state for collection components. It handles filter panel visibility, custom columns selection, data capsule persistence, fedops reporting, and responsive layout calculations. You typically do not create this directly — it is managed internally by `TableState`, `GridState`, and similar component states.

### Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `closeSidePanel` | `() => void` | Yes | - | Closes WixPatterns side panel |
| `openFiltersPanel` | `() => void` | Yes | - | Opens the filters side panel |
| `openCustomFieldModal` | `() => void` | Yes | - | Opens the custom field modal on create mode |
| `getPendingFilter` | `<A>(filter: A) => Filter<any> \| A` | Yes | - | Use this function when using [AddApplyFiltersButton](./?path=/story/features-filter-components--toolbarfilters#Apply_changes) to obtain a reference to the filter that is about to be applied. This is useful when you want to modify the filter value within a custom filter component. |

