@kanunilabs/datagrid-enterprise
@kanunilabs/datagrid-enterprise / EditingOptions
Interface: EditingOptions<TRow>
Extends
CellEditingOptions<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.
Overrides
CellEditingOptions.editOnKeyPress
enabled?
optionalenabled?:boolean
Default true once editing is passed.
Overrides
CellEditingOptions.enabled
focusCellOnCycle?
optionalfocusCellOnCycle?:boolean
Tab past the end of a row wraps to the next one. Default true.
Overrides
CellEditingOptions.focusCellOnCycle
focusCellOnTab?
optionalfocusCellOnTab?:boolean
Tab moves between cells inside the grid. Default true.
Overrides
CellEditingOptions.focusCellOnTab
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.
Inherited from
CellEditingOptions.formHeight
formLabels?
optionalformLabels?:Record<string,string>
Rename the built-in strings for THIS grid (save, cancel,
editSaveChanges…). Merged over the locale's dictionary.
Inherited from
CellEditingOptions.formLabels
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
How edits are collected. Default 'batch' here ('cell' in Community).
Overrides
CellEditingOptions.mode
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>
Overrides
CellEditingOptions.onSave
range?
optionalrange?:boolean
Enables range selection, the fill handle and paste. Default true. With
enabled: false, range: true keeps cell and range selection and Ctrl+C
(what the cells show) on a grid nobody can edit.
rules?
optionalrules?:Record<string,ValidationRule<TRow>[]>
Validation rules per column id.