# Filter Selection Cascade
URL: https://pro.rv-grid.com/guides/data-filter/filter-selection-cascade/
Source: src/content/docs/guides/data-filter/filter-selection-cascade.mdx
Description: Enable context-aware cascading options for RevoGrid Pro selection filters.
Use `filter.selection.cascadeOptions.enabled` to make selection options context-aware.

In cascade mode, RevoGrid builds each column's selection list from rows matching all active filters **except filters for the current column**. This keeps the current column reversible while still narrowing options in related columns.

Set `filter.selection.cascadeOptions.showDependencyNumbers` to `true` to show `1`, `2`, and later badges on active header filter icons in the order those filters are applied. The badges are hidden by default; omit this option or set it to `false` to keep them hidden.

- If `country = Germany` is active, opening the **city** filter shows `Berlin` and `Munich`.
- Opening the **country** filter still shows `Germany`, `France`, and `Poland`.
- The feature is opt-in and does not change default behavior.

## Configuration

```ts
grid.filter = {
  multiFilterItems: {
    department: [{ id: 0, type: 'selection', value: ['sales', 'support'], relation: 'and' }],
    country: [{ id: 1, type: 'selection', value: ['france', 'poland'], relation: 'and' }],
  },
  selection: {
    cascadeOptions: {
      enabled: true,
      showDependencyNumbers: true,
    },
  },
};
```

## Compatibility with custom getItems

If `selection.getItems` is provided, that custom source is used as-is.
Cascade options are only applied to the built-in source loader.
