@kanunilabs/datagrid-react / UseGridEditingOptions
Interface: UseGridEditingOptions<TRow>
Type Parameters
TRow
TRow = GridRowData
Properties
allowAdding?
optionalallowAdding?:boolean
allowDeleting?
optionalallowDeleting?:boolean| ((row) =>boolean)
allowUpdating?
optionalallowUpdating?:boolean| ((row,columnId) =>boolean)
appendOnArrowDown?
optionalappendOnArrowDown?:boolean
Arrow-down on the LAST row appends a blank one. Default false.
The other half of the same data-entry habit: fill a row, press down, keep typing. Also off by default — with it on, a user who holds arrow-down to reach the bottom creates a row when they arrive.
appendOnTab?
optionalappendOnTab?:boolean
Tab on the last editable cell of the last row adds a blank row and moves
to its first editable cell (P-7.8). Shift+Tab never adds one and stays on
the first cell. Needs allowAdding. Default false.
canEditColumn?
optionalcanEditColumn?: (columnId) =>boolean
An extra say on which columns open an editor, on top of the column's own
editable: false. The free grid uses it to keep lookup and custom-editor
columns read-only — those editors are Enterprise.
Parameters
columnId
string
Returns
boolean
commitOn?
optionalcommitOn?:CommitOn
cell mode: save each committed cell at once ('cell', default) or the
whole row once the user leaves it ('row', P-10) — to another row by any
key or click, or out of the grid. A new row left empty is dropped, never
sent. Ignored by the other modes.
confirmDelete?
optionalconfirmDelete?:boolean| ((rowKey,row) =>boolean|Promise<boolean>)
Ask before deleting. Default: a browser confirm.
false deletes straight away. A FUNCTION replaces the prompt with the
app's own dialog — return false (or a promise of false) to abandon it.
confirmDeleteMessage?
optionalconfirmDeleteMessage?:string
Wording for the built-in prompt. Ignored when confirmDelete is a function.
controller
controller:
DataGridController<TRow> |null
crud?
optionalcrud?:CrudHandlers<TRow>
Per-row persistence — the app's own insert/update/delete calls.
deleteKey?
optionaldeleteKey?:boolean
Ctrl+Delete (Cmd+Delete) deletes the focused row (P-7.5): allowDeleting,
then the confirmDelete FUNCTION is asked; without a function nothing is
deleted. On a row already marked removed (batch) it restores it. Not
while an editor is open (the key is the text box's). Default false.
editKeys?
optionaleditKeys?:EditKeys
Which gestures open an editor (P-7.1): f2, enter, typing,
doubleClick. Each left out keeps today's behaviour.
editOnKeyPress?
optionaleditOnKeyPress?:boolean
Typing a printable key on a focused cell starts editing. Default true.
enabled?
optionalenabled?:boolean
Disables editing entirely (editing={{ enabled: false }}).
fillKeys?
optionalfillKeys?:boolean
Ctrl+D / Ctrl+R fill down / right over the selection. Default true.
focusCellOnCycle?
optionalfocusCellOnCycle?:boolean
Tab past the end of a row wraps to the next one. Default true.
focusCellOnTab?
optionalfocusCellOnTab?:boolean
Tab moves between cells inside the grid instead of leaving it. Default true.
history?
optionalhistory?:boolean
Undo / redo: Ctrl+Z and Ctrl+Y (Cmd on a Mac) and controller.undo().
Default true. The free grid passes false — single-cell editing is
Community, history is Enterprise (owner decision, 2026-10-12).
insertKey?
optionalinsertKey?:boolean|"above"|"below"
Insert opens a blank row next to the focused one: true or 'above'
above it, 'below' under it. Default false (off).
Off by default because Insert is not a neutral key: some users have it
bound elsewhere, and a grid that starts creating records on a keypress
nobody asked for is a surprise. When on, the key is the grid's whenever a
cell has focus: it is preventDefault()ed even when no row can be added,
so a page-level Insert shortcut does not fire for it (P-7.5).
keepEditingOnTab?
optionalkeepEditingOnTab?:boolean
Keep the editor open when Tab moves. Default false.
mode?
optionalmode?:EditMode
newRowPosition?
optionalnewRowPosition?:NewRowPosition
Where addRow() puts the new record. Default 'last'.
onInitNewRow?
optionalonInitNewRow?: (values) =>void
Parameters
values
Record<string, unknown>
Returns
void
onReady?
optionalonReady?: (api) =>void
Called ONCE when the grid's editing is ready, with the EditingApi (P-1)
— the same object controller.editing returns while the grid is mounted.
Not called again for a React StrictMode remount or a re-render; the object
stays valid across both and turns into a harmless no-op after unmount.
Parameters
api
EditingApi<TRow>
Returns
void
onRowInserted?
optionalonRowInserted?: (key,row) =>void
Parameters
key
row
TRow | undefined
Returns
void
onRowRemoved?
optionalonRowRemoved?: (key,row) =>void
Parameters
key
row
TRow | undefined
Returns
void
onRowUpdated?
optionalonRowUpdated?: (key,row,values) =>void
Parameters
key
row
TRow | undefined
values
Record<string, unknown>
Returns
void
onSave?
optionalonSave?: (changes) =>void|Promise<void>
Parameters
changes
unknown[]
Returns
void | Promise<void>
range?
optionalrange?:boolean
editing.range — the rectangle, the fill handle and the clipboard
gestures (cut / paste). Default true. Off means Ctrl+X and Ctrl+V are left
alone too, the same as the vanilla renderer: one switch, all three.
rangePaste?
optionalrangePaste?:boolean
Ctrl+V over several selected cells spreads a copied table over them.
Default true. false: the paste goes to the focused cell only and the
clipboard text is ONE value (tabs and line breaks do not split it).
rowMessages?
optionalrowMessages?:boolean
The grid shows a refused save's reason under the row (rowStatus.messages).
With commitOn: 'row' a row refused on leave is then reported there only,
not also in the "cannot save" dialog. Default false.
rules?
optionalrules?:Record<string,ValidationRule<TRow>[]>
savedDuration?
optionalsavedDuration?:number
How long a row reads 'saved' after its save (engine.getRowStatus),
in ms; 0 never shows it. Left out, the engine's default (1500) stays.
The grids pass rowStatus.savedDuration, or 0 when rowStatus is off.