Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Comcast/react-data-grid/llms.txt
Use this file to discover all available pages before exploring further.
Overview
TherenderTextEditor function provides a basic text input editor for editable cells in the DataGrid. It renders an input field that auto-focuses and selects the text when editing begins.
Signature
Parameters
The edit cell renderer props.
RenderEditCellProps
The row object being edited.
The column object for the cell being edited.
The index of the row being edited.
Callback to update the row. Call with the updated row object.
Callback to close the editor. Pass
true to commit changes, false to discard.Return Value
A text input element configured for editing the cell value.
Usage
Assign this function to therenderEditCell property of a column to make it editable:
Features
- Auto-focus: The input automatically receives focus when editing begins
- Auto-select: The existing text is automatically selected for easy replacement
- Blur handling: Changes are automatically committed when the input loses focus
- Styled: Includes default styling with border, padding, and focus states
Example
Basic editable grid with text editor:Custom Editors
For more complex editing requirements, you can create a custom editor:Related
- Column Type - Column type definition
- RenderEditCellProps - Edit cell props type
- DataGrid Component - DataGrid props and configuration