@kanunilabs/datagrid-enterprise
@kanunilabs/datagrid-enterprise / LookupEditorSpec
Interface: LookupEditorSpec
Properties
allowCustom?
optionalallowCustom?:boolean
Let text that matches nothing become the value. Default false.
ariaLabel?
optionalariaLabel?:string
autoFocus?
optionalautoFocus?:boolean
Take focus once connected. True for a cell editor; false in row/form mode, where every editable cell mounts an editor at once.
columnId?
optionalcolumnId?:string
commitOnPick?
optionalcommitOnPick?:boolean
Whether picking an item counts as committing. True for a cell editor — the pick IS the edit. False in row/form mode, where only Save ends it.
invalid?
optionalinvalid?:boolean
matchMode?
optionalmatchMode?:LookupMatchMode
Prefix (default) or substring.
noMatchText
noMatchText:
string
No-match caption (t.editNoMatch).
onCancel
onCancel: () =>
void
Returns
void
onChange
onChange: (
value) =>void
Parameters
value
unknown
Returns
void
onCommit
onCommit: () =>
void
Returns
void
onPortalOpen?
optionalonPortalOpen?: (close) =>void
Called when the editor opens a layer on document.body (the lookup list,
the date calendar), handing back the function that closes it again.
The layer outlives its cell by design — it is portalled so the grid's
scroller cannot clip it — which means removing the grid's DOM does not
remove it. Without this the layer stayed on screen after
grid.destroy(), hanging over whatever the app rendered next, until the
next scroll or resize let place() notice the input was gone.
The editing layer keeps the closer and calls it on dispose. Scoped per grid on purpose: a global registry would let one grid's teardown close another grid's open dropdown.
Parameters
close
() => void
Returns
void
onTab?
optionalonTab?: (shiftKey) =>void
Parameters
shiftKey
boolean
Returns
void
options
options: readonly
LookupItem[]
surfaceClass?
optionalsurfaceClass?:string
The portal's surface classes, so the list resolves the --dg tokens.
testId?
optionaltestId?:string
value
value:
unknown