@kanunilabs/datagrid / CellEditingExtension
Interface: CellEditingExtension<TRow>
What the Enterprise layer adds. Not part of the Community surface: the Community grid never builds one.
Type Parameters
TRow
TRow = GridRowData
Properties
cellAdornment?
optionalcellAdornment?: (ctx) =>Node|null
Something drawn into a cell that is NOT being edited (the fill handle).
Parameters
ctx
CellSlotContext<TRow>
Returns
Node | null
customEditors?
optionalcustomEditors?:boolean
Honour a column's renderEditor. Default false.
decorateBar?
optionaldecorateBar?: (bar) =>void
Add buttons to the edit strip ahead of the base's (the Add button).
Parameters
bar
HTMLElement
Returns
void
engine?
optionalengine?:Partial<EditingEngineOptions<TRow>>
Engine options beyond the Community set — mode, rules, CRUD, permissions.
formLookup?
optionalformLookup?: (rowKey,columnId,update) => {allowCustom?:boolean;matchMode?:LookupMatchMode;options: readonlyLookupItem[] |null; } |undefined
A form field's lookup list (with the combo box): static lists returned,
async ones delivered later through update. Default: the static list,
shown read-only by label.
Parameters
rowKey
columnId
string
update
(options) => void
Returns
Type Literal
{ allowCustom?: boolean; matchMode?: LookupMatchMode; options: readonly LookupItem[] | null; }
allowCustom?
optionalallowCustom?:boolean
matchMode?
optionalmatchMode?:LookupMatchMode
options
options: readonly
LookupItem[] |null
null = loading (dynamic list in flight).
undefined
isColumnEditable?
optionalisColumnEditable?: (columnId) =>boolean
Column-level editability. Default: the column's editable flag.
Parameters
columnId
string
Returns
boolean
keepEditingOnTab?
optionalkeepEditingOnTab?:boolean
Keep the editor open when Tab moves. Default false.
onChange?
optionalonChange?: () =>void
After every engine change and the repaint it requests.
Returns
void
renderLookup?
optionalrenderLookup?: (spec) =>HTMLElement
The lookup combo box builder, for buildCellEditor.
Parameters
spec
Returns
HTMLElement
resolveLookup?
optionalresolveLookup?: (rowKey,columnId) =>object
The choices for a lookup cell; options: undefined = not a lookup.
Parameters
rowKey
columnId
string
Returns
object
allowCustom?
optionalallowCustom?:boolean
matchMode?
optionalmatchMode?:LookupMatchMode
options
options: readonly
LookupItem[] |null|undefined