Documentation

@kanunilabs/datagrid-react


@kanunilabs/datagrid-react / UseEditModesOptions

Interface: UseEditModesOptions<TRow>

Type Parameters

TRow

TRow = GridRowData

Properties

active

active: boolean

Editing is on AND drawn (not paused behind cards).


batchBar?

optional batchBar?: boolean

Offer the batch Save/Cancel pair in the strip. Default true. The Enterprise grid shows it only for an explicit mode: 'batch' (its default batch mode saves from the command column) and passes that here.


cardPopup?

optional cardPopup?: boolean

Cards are shown with cardView.edit: 'popup' (P-9): an open row session of a row mode — opened in the table before the grid narrowed — is drawn as the popup, the one editor a card view has.


controller

controller: DataGridController<TRow> | null


customEditors?

optional customEditors?: boolean

A column's renderEditor draws its form field (Enterprise).


dark?

optional dark?: boolean


editing

editing: UseGridEditingResult<TRow>

The editing layer the modes draw (useGridEditing's result).


formHeight?

optional formHeight?: number

Starting height in px for the in-grid form, before it is measured.


formLabels?

optional formLabels?: Partial<EditFormLabels>

Wording for the form/popup editor.


isFormColumn?

optional isFormColumn?: (columnId) => boolean

Columns that are not fields of the record (the command column).

Parameters

columnId

string

Returns

boolean


mode

mode: EditMode

The mode in force.


rootRef

rootRef: RefObject<HTMLElement | null>

The element the row editors are looked up in, to focus one on open.


rowHeight

rowHeight: number

The grid's row height in px — a form re-measure smaller than a row is noise.


rowLookups?

optional rowLookups?: RowLookupMap

Lookup combos for the open row (Enterprise).