API REFERENCE

selectionChanged

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

What does this API do?

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

Exact input and result types

typescript
selectionChanged: GridSelectionChangedDetail

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();

Read related types

Feature explanations and examples