# RenderRow

> _Since v0.1.1_

Discriminated union of row types in the flattened render model.

The grouping plugin transforms the grid's row array into a flat list of
`RenderRow` items that the virtualization engine iterates over. Each item
is either a [`GroupRowModelItem`](/grid/plugins/grouping-rows/interfaces/grouprowmodelitem.md) (group header) or a [`DataRowModelItem`](/grid/plugins/grouping-rows/interfaces/datarowmodelitem.md)
(leaf data row). Use the `kind` property to discriminate:

```typescript
for (const row of flattenedRows) {
  if (row.kind === 'group') {
    renderGroupHeader(row);   // row is GroupRowModelItem
  } else {
    renderDataRow(row);       // row is DataRowModelItem
  }
}
```

```ts
type RenderRow = GroupRowModelItem | DataRowModelItem
```
