@kanunilabs/datagrid-react / EditModes
Interface: EditModes<TRow>
Type Parameters
TRow
TRow = GridRowData
Properties
bar
bar:
ReactNode
The row strip (row mode) and the batch Save/Cancel, or null when there is nothing to show.
defaultContent
defaultContent: (
ctx,value) =>ReactNode
A value drawn the way the grid draws it (renderCell → lookup → formatter → date).
Parameters
ctx
CellSlotContext<TRow>
value
unknown
Returns
ReactNode
editRowMenuItem
editRowMenuItem: <
TContext>(rowKey) =>GridMenuItem<TContext> |null
"Edit row…" for the row menu, or null when no row can be opened now.
Type Parameters
TContext
TContext
Parameters
rowKey
Returns
GridMenuItem<TContext> | null
isRowEditing
isRowEditing: (
rowKey) =>boolean
True for the row drawn as editors in row mode.
Parameters
rowKey
Returns
boolean
openCardEditor
openCardEditor: (
rowKey) =>boolean
Open a row in the popup from a card (cardView.edit: 'popup', P-9), in
any mode. False when it cannot be opened (locked, removed, another row open).
Parameters
rowKey
Returns
boolean
openRow
openRow: (
rowKey) =>boolean
Open a row (double-click in a row mode). False when not a row mode.
Parameters
rowKey
Returns
boolean
popup
popup:
ReactNode
The popup form (popup mode, a row open), or null. Unportaled.
renderEditForm
renderEditForm: ((
rowKey) =>ReactNode) |undefined
The grid's renderEditForm slot in form mode; undefined otherwise.
renderPending
renderPending: (
ctx) =>ReactNode
A cell's PENDING value (batch), drawn; undefined when it has none.
Parameters
ctx
CellSlotContext<TRow>
Returns
ReactNode
renderRowCell
renderRowCell: (
ctx) =>ReactNode
The open row's cell in row mode: its editor, or its value when read-only. Undefined otherwise.
Parameters
ctx
CellSlotContext<TRow>
Returns
ReactNode
rowModeActive
rowModeActive:
boolean
A row mode (row / form / popup) is in force and drawn.
rowSession
rowSession:
RowEditSession|null
The open row, in a row mode; null otherwise.
rowSessionAttr
rowSessionAttr:
"popup"|"form"|undefined
What data-row-session on the grid's wrapper says, for the pointer lock.