Documentation

@kanunilabs/datagrid-enterprise


@kanunilabs/datagrid-enterprise / EditingOptions

Interface: EditingOptions<TRow>

Extends

  • CellEditingOptions<TRow>

Type Parameters

TRow

TRow = GridRowData

Properties

allowAdding?

optional allowAdding?: boolean


allowDeleting?

optional allowDeleting?: boolean | ((row) => boolean)


allowUpdating?

optional allowUpdating?: boolean | ((row, columnId) => boolean)


appendOnArrowDown?

optional appendOnArrowDown?: boolean

Arrow-down on the LAST row appends a blank one. Default false.


commandColumn?

optional commandColumn?: boolean

Pinned column of icon actions at the end of the grid. Default false.


commandLabels?

optional commandLabels?: Partial<CommandColumnLabels>

Wording for the command column's buttons.


confirmDelete?

optional confirmDelete?: boolean | ((rowKey, row) => boolean | Promise<boolean>)

Ask before deleting. Default: the grid's centred dialog.


confirmDeleteMessage?

optional confirmDeleteMessage?: string

Wording for the built-in prompt. Ignored when confirmDelete is a function.


crud?

optional crud?: CrudHandlers<TRow>

Per-ROW persistence; any handler here takes precedence over onSave.


editOnKeyPress?

optional editOnKeyPress?: boolean

Typing a printable key on a focused cell starts editing. Default true.

Overrides

CellEditingOptions.editOnKeyPress


enabled?

optional enabled?: boolean

Default true once editing is passed.

Overrides

CellEditingOptions.enabled


focusCellOnCycle?

optional focusCellOnCycle?: boolean

Tab past the end of a row wraps to the next one. Default true.

Overrides

CellEditingOptions.focusCellOnCycle


focusCellOnTab?

optional focusCellOnTab?: boolean

Tab moves between cells inside the grid. Default true.

Overrides

CellEditingOptions.focusCellOnTab


formHeight?

optional formHeight?: 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?

optional formLabels?: 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?

optional insertKey?: boolean

Insert opens a blank row ABOVE the focused one. Default false.


keepEditingOnTab?

optional keepEditingOnTab?: boolean

Keep the editor open when Tab moves. Default false.


mode?

optional mode?: EditMode

How edits are collected. Default 'batch' here ('cell' in Community).

Overrides

CellEditingOptions.mode


newRowPosition?

optional newRowPosition?: NewRowPosition

Where addRow() puts the new record. Default 'last'.


onInitNewRow?

optional onInitNewRow?: (values) => void

Parameters

values

Record<string, unknown>

Returns

void


onRowInserted?

optional onRowInserted?: (key, row) => void

Parameters

key

RowKey

row

TRow | undefined

Returns

void


onRowRemoved?

optional onRowRemoved?: (key, row) => void

Parameters

key

RowKey

row

TRow | undefined

Returns

void


onRowUpdated?

optional onRowUpdated?: (key, row, values) => void

Parameters

key

RowKey

row

TRow | undefined

values

Record<string, unknown>

Returns

void


onSave?

optional onSave?: (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?

optional range?: 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?

optional rules?: Record<string, ValidationRule<TRow>[]>

Validation rules per column id.