# selectionChanged

Emitted when row selection changes. Use selected IDs to define bulk-operation targets.

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

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

## What does this API do?

Emitted when row selection changes. Use selected IDs to define bulk-operation targets.

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

## Exact input and result types

```typescript
selectionChanged: GridSelectionChangedDetail
```

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

## Usage flow

Subscribe with grid.addEventListener('selectionChanged', 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('selectionChanged', event => {
  console.log(event.detail);
}, { signal: controller.signal });
// On view disposal: controller.abort();
```

<a id="types"></a>

## Read related types

- [GridSelectionChangedDetail](https://grid.syidax.com/docs/types/GridSelectionChangedDetail.md)

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

## Feature explanations and examples

- [Row selection](https://grid.syidax.com/docs/features/row-selection.md) — Row selection chooses targets for bulk actions such as approval, export, or assignment. Unlike cell range selection, it selects an entire order.
