Edit grid
View sourceClick any editable cell, type, press Enter or Tab to commit. Each commit event is intercepted by onCellEditCommit; the panel below the grid shows the most recent commits.
Try this
The Order # column is read-only; everything else is editable. Each commit shows up in the Recent commits panel.
- Double-click or press Enter on a cell to start editing.
- Press Tab to commit + advance, Esc to abandon.
- Status uses a select editor; Amount uses a number editor; Opened uses a date editor.
- Type a non-numeric value into Amount and press Tab — the editor rejects it and the cell stays open.
The commit lifecycle
- prepare. Editor mounts with
initialValue(the current cell value) and a hidden cell rect for portal positioning. - validate. Editor-side validation runs first; bad input keeps the editor open. Per-column
validateruns second and can be sync orasync(withAbortSignal). - commit. The grid fires
onCellEditCommitwith{ rowId, column, previousValue, nextValue, … }. You write the change to your data source. - optimistic + rollback. For server flows, return
Promise<{ status: "rejected", reason }>to roll the cell back and surfacereasonas the cell-level error.
Key bindings
- Enter / F2 — start editing
- Tab / Enter — commit + advance
- Esc — abandon and close
- Backspace / Delete — clear and edit