@kanunilabs/datagrid / VanillaEditorRenderContext
Interface: VanillaEditorRenderContext<TRow>
Defined in: datagrid/src/createGrid.ts:309
What a column's own editor is handed {M} the React EditorRenderContext,
DOM-typed. Same commit/cancel handles the built-in editor uses, so a custom
control is a PEER of it rather than something bolted on beside it.
The one shape difference from React is onErrorChange, and it is forced by
the medium. React re-invokes renderEditor on every validation change and
reconciles the result; a DOM node cannot be re-created that way without
throwing away caret position, open dropdowns and any state the control keeps
internally. So the editor is built ONCE and subscribes instead.
Type Parameters
TRow
TRow = GridRowData
Properties
cancel
cancel: () =>
void
Defined in: datagrid/src/createGrid.ts:321
Returns
void
columnId
columnId:
string
Defined in: datagrid/src/createGrid.ts:314
commit
commit: () =>
void
Defined in: datagrid/src/createGrid.ts:320
Returns
void
error
error:
string|null
Defined in: datagrid/src/createGrid.ts:316
Validation message for value at build time, or null.
onErrorChange
onErrorChange: (
listener) => () =>void
Defined in: datagrid/src/createGrid.ts:318
Called when validation changes; returns an unsubscribe.
Parameters
listener
(error) => void
Returns
() => void
row
row:
TRow
Defined in: datagrid/src/createGrid.ts:313
The row with pending edits applied {M} what a cascading list should read.
setValue
setValue: (
value) =>void
Defined in: datagrid/src/createGrid.ts:319
Parameters
value
unknown
Returns
void
value
value:
unknown
Defined in: datagrid/src/createGrid.ts:311
Current (uncommitted) editor value.