@kanunilabs/datagrid / EditFormSpec
Interface: EditFormSpec
Properties
fields
fields: readonly
EditFormField[]
getErrors
getErrors: () =>
Record<string,string>
Validation message per column id; only invalid columns appear.
Returns
Record<string, string>
getSaveError
getSaveError: () =>
string|null
Returns
string | null
getSaving
getSaving: () =>
boolean
Returns
boolean
getValue
getValue: (
columnId) =>unknown
Current (pending) value per column.
Parameters
columnId
string
Returns
unknown
inline?
optionalinline?:boolean
Drawn INSIDE the grid, in the row flow (mode: 'form') — drops the
floating chrome so the panel does not draw a card inside the row.
isNew
isNew:
boolean
onCancel
onCancel: () =>
void
Returns
void
onChange
onChange: (
columnId,value) =>void
Parameters
columnId
string
value
unknown
Returns
void
onNaturalHeight?
optionalonNaturalHeight?: (px) =>void
Reports the height the form WANTS, in px, once it is in the DOM.
Parameters
px
number
Returns
void
onPortalOpen?
optionalonPortalOpen?: (close) =>void
Called when a nested editor opens a layer on document.body.
Parameters
close
() => void
Returns
void
onSave
onSave: () =>
void
Returns
void
popup?
optionalpopup?:boolean
Rendered as a modal dialog rather than inline in a row.
renderLookup?
optionalrenderLookup?: (spec) =>HTMLElement
Builds the combo box for a lookup field. Supplied by the Enterprise edition; without it a lookup field renders read-only, showing its label.
Parameters
spec
Returns
HTMLElement
rowKey
rowKey:
RowKey
surfaceClass?
optionalsurfaceClass?:string
The portal surface classes (popup mode + nested editors).
t
t:
GridDictionary