# detailRowToggled

Emitted when a parent row's detail expansion changes.

Canonical: https://grid.syidax.com/docs/events/detailRowToggled/

<a id="meaning"></a>

## What does this API do?

Emitted when a parent row's detail expansion changes.

API for Pro features: Built-in master / detail

<a id="contract"></a>

## Exact input and result types

```typescript
detailRowToggled: { rowId: string | number; expanded: boolean }
```

<a id="usage"></a>

## Usage flow

Subscribe with grid.addEventListener('detailRowToggled', handler). The result is in event.detail, and event names are case-sensitive. Remove subscriptions when disposing of the view.

```javascript
const controller = new AbortController();
grid.addEventListener('detailRowToggled', event => {
  console.log(event.detail);
}, { signal: controller.signal });
// On view disposal: controller.abort();
```

<a id="recipes"></a>

## Feature explanations and examples

- [Row details](https://grid.syidax.com/docs/features/master-detail.md) — Master/detail expands an order to show its line items or shipping history. The parent row is a summary, and a full-width panel beneath it holds details.
