@kanunilabs/datagrid-enterprise
@kanunilabs/datagrid-enterprise / EditingOptions
Interface: EditingOptions<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.
commandColumn?
optionalcommandColumn?:boolean
Pinned column of icon actions at the end of the grid. Default false.
commandLabels?
optionalcommandLabels?:Partial<CommandColumnLabels>
Wording for the command column's buttons.
confirmDelete?
optionalconfirmDelete?:boolean| ((rowKey,row) =>boolean|Promise<boolean>)
Ask before deleting. Default: the grid's centred dialog.
confirmDeleteMessage?
optionalconfirmDeleteMessage?:string
Wording for the built-in prompt. Ignored when confirmDelete is a function.
crud?
optionalcrud?:CrudHandlers<TRow>
Per-ROW persistence; any handler here takes precedence over onSave.
editOnKeyPress?
optionaleditOnKeyPress?:boolean
Typing a printable key on a focused cell starts editing. Default true.
enabled?
optionalenabled?:boolean
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. Default true.
formHeight?
optionalformHeight?:number
Starting height in px for the in-grid form (mode: 'form') before it
has been measured — only worth setting to stop the one-frame resize.
formLabels?
optionalformLabels?:Record<string,string>
Rename the built-in strings for THIS grid — the React option, same shape. Merged over the locale's dictionary, so a partial object renames what it names and leaves the rest translated.
insertKey?
optionalinsertKey?:boolean
Insert opens a blank row ABOVE the focused one. Default false.
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
onRowInserted?
optionalonRowInserted?: (key,row) =>void
Parameters
key
RowKey
row
TRow | undefined
Returns
void
onRowRemoved?
optionalonRowRemoved?: (key,row) =>void
Parameters
key
RowKey
row
TRow | undefined
Returns
void
onRowUpdated?
optionalonRowUpdated?: (key,row,values) =>void
Parameters
key
RowKey
row
TRow | undefined
values
Record<string, unknown>
Returns
void
onSave?
optionalonSave?: (changes) =>void|Promise<void>
Persist a batch of changes. Rejecting keeps them pending.
Parameters
changes
RowChange<TRow>[]
Returns
void | Promise<void>
range?
optionalrange?:boolean
Enables range selection, the fill handle and paste. Default true.
rules?
optionalrules?:Record<string,ValidationRule<TRow>[]>
Validation rules per column id.