# TableSectionsProp

**Category:** Common/Types

## API

### Overview

Configuration object for the `sections` prop on [`Table`](./?path=/story/base-components-collections-table--table). Enables grouping table rows into collapsible sections with headers. Provide a `TableSections` component, a `groupBy` function, a `renderSection` callback, and optional `collapsible` and `events` properties.

### Description

Pass to the `sections` prop of a `Table` component to create [Table Sections](./?path=/story/features-display-table-sections--table-sections).

### Props

| Prop | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `TableSections` | `(<T, F extends FiltersMap>({ groupBy, renderSection, table, columns, rowDetails, collapsible, events, ...collectionTableProps }: TableSectionsProps<T, F>) => Element) & { displayName: string; }` | Yes | - | A `TableSections` component. Import and pass the component without parameters. |
| `groupBy` | `GroupBy<T>` | Yes | - | A function that extracts the grouping key from an item. Items with the same key will be grouped into the same section. |
| `renderSection` | `RenderSection<T>` | Yes | - | A callback function to render the table sections. The function receives the section ID and items in the section, and should return the `title`, and optional `primaryAction`, `badge`, or `summary` for each section. For more information, see the [section](./?path=/story/common-types--collectionsection) type. |

