---
title: "Rich Select Cell Editor"
enterprise: true
framework: react
version: "36.1.0"
---

# Rich Select Cell Editor

An alternative to using the browser's `select` popup for dropdowns inside the grid. The Rich Select Cell Editor allows users to enter a cell value from a list of provided values by searching or filtering the list.

## Enabling Rich Select Cell Editor

Edit any cell in the grid below to see the Rich Select Cell Editor.

#### Rich Select Editor

```tsx
"use client";

import React, {
  useCallback,
  useMemo,
  useRef,
  useState,
  StrictMode,
} from "react";
import { createRoot } from "react-dom/client";
import { AgGridReact, AgGridProvider } from "ag-grid-react";
import {
  ClientSideRowModelModule,
  ColDef,
  ColGroupDef,
  GridApi,
  GridOptions,
  IRichCellEditorParams,
  ModuleRegistry,
  TextEditorModule,
  enableDevValidations,
} from "ag-grid-community";
import { RichSelectModule } from "ag-grid-enterprise";

if (process.env.NODE_ENV !== "production") {
  enableDevValidations();
}

const modules = [TextEditorModule, ClientSideRowModelModule, RichSelectModule];

const languages = ["English", "Spanish", "French", "Portuguese", "(other)"];

function getRandomNumber(min: number, max: number) {
  // min and max included
  return Math.floor(window.agRandom() * (max - min + 1) + min);
}

const GridExample = () => {
  const containerStyle = useMemo(() => ({ width: "100%", height: "100%" }), []);
  const gridStyle = useMemo(() => ({ height: "100%", width: "100%" }), []);
  const [rowData, setRowData] = useState<any[]>(
    new Array(100)
      .fill(null)
      .map(() => ({ language: languages[getRandomNumber(0, 4)] })),
  );
  const [columnDefs, setColumnDefs] = useState<ColDef[]>([
    {
      headerName: "Rich Select Editor",
      field: "language",
      cellEditor: "agRichSelectCellEditor",
      cellEditorParams: {
        values: languages,
      } as IRichCellEditorParams,
    },
  ]);
  const defaultColDef = useMemo<ColDef>(() => {
    return {
      width: 200,
      editable: true,
    };
  }, []);

  return (
    <AgGridProvider modules={modules}>
      <div style={containerStyle}>
        <div style={gridStyle}>
          <AgGridReact
            rowData={rowData}
            columnDefs={columnDefs}
            defaultColDef={defaultColDef}
          />
        </div>
      </div>
    </AgGridProvider>
  );
};

const root = createRoot(document.getElementById("root")!);
root.render(
  <StrictMode>
    <GridExample />
  </StrictMode>,
);
```

[Live example: Rich Select Editor](https://www.ag-grid.com/examples/provided-cell-editors-rich-select/rich-select-editor/reactFunctionalTs)

Enabled with `agRichSelectCellEditor` and configured with `IRichCellEditorParams`.

```js
columnDefs: [
    {
        cellEditor: 'agRichSelectCellEditor',
        cellEditorParams: {
            values: ['English', 'Spanish', 'French', 'Portuguese', '(other)'],
        }
        // ...other props
    }
]
```

Benefits over browser's `select` are as follows:

- Uses DOM row virtualisation so very large lists can be displayed.
- Integrates with the grid perfectly, avoiding glitches seen with the standard select.
- Uses HTML to render the values: you can provide cell renderers to customise what each value looks like.

## Customisation

The Rich Select Editor can be customised to give the desired results. See the [Customisation](https://www.ag-grid.com/react-data-grid/provided-cell-editors-rich-select-customisation/) page for details:

- [Cell Renderer](https://www.ag-grid.com/react-data-grid/provided-cell-editors-rich-select-customisation/#cell-renderer) - use a cell renderer within the editor
- [Format Values](https://www.ag-grid.com/react-data-grid/provided-cell-editors-rich-select-customisation/#format-values) - format values within the list
- [Search Values](https://www.ag-grid.com/react-data-grid/provided-cell-editors-rich-select-customisation/#search-values) - different types of search matching
- [Allow Typing](https://www.ag-grid.com/react-data-grid/provided-cell-editors-rich-select-customisation/#allow-typing) - allow text input to match list items
- [Multi Selection](https://www.ag-grid.com/react-data-grid/provided-cell-editors-rich-select-customisation/#multi-selection) - allow the selection of multiple values
- [Complex Objects](https://www.ag-grid.com/react-data-grid/provided-cell-editors-rich-select-customisation/#complex-objects) - configure support for items that are complex objects

## Async Values

The Rich Select editor can be configured to load values asynchronously. For large datasets the editor supports paging async values as well as filtering values asynchronously on a server. See the [Async Values](https://www.ag-grid.com/react-data-grid/provided-cell-editors-rich-select-async/) page for details:

- [Async Values](https://www.ag-grid.com/react-data-grid/provided-cell-editors-rich-select-async/) - load all values asynchronously
- [Paged Async Values](https://www.ag-grid.com/react-data-grid/provided-cell-editors-rich-select-async/#paged-async-values) - load pages as the user scrolls
- [Async Filtering](https://www.ag-grid.com/react-data-grid/provided-cell-editors-rich-select-async/#async-filtering) - return filtered values asynchronously
- [Paged Async Filtering](https://www.ag-grid.com/react-data-grid/provided-cell-editors-rich-select-async/#paged-async-filtering) - combine paged loading with filtering

## API

See all properties available on the [IRichCellEditorParams](https://www.ag-grid.com/react-data-grid/provided-cell-editors-rich-select-customisation/#api) interface.
