@kanunilabs/datagrid-react-enterprise
@kanunilabs/datagrid-react-enterprise / GridCellEditorProps
Interface: GridCellEditorProps
Properties
allowCustom?
optionalallowCustom?:boolean
Let the user type a value outside options.
ariaLabel?
optionalariaLabel?:string
Accessible name for the editor, used by the lookup combo box.
dataType
dataType:
GridDataType|undefined
dateFormat?
optionaldateFormat?:string
Format for a date column — governs both the mask and the display.
error
error:
string|null
Validation message for the current value; null when valid.
lookupSettings?
optionallookupSettings?:LookupEditorSettings
The rest of the column's lookup as the combo box reads it (P-5 / P-6):
code + name, K-3, onNoMatch. Wins over allowCustom / matchMode.
matchMode?
optionalmatchMode?:LookupMatchMode
How typed text narrows the lookup list. Default 'startsWith'.
multipleLookup?
optionalmultipleLookup?:ColumnLookup<never>
The column's lookup when it is multiple (B.6): the check-box editor.
numberFormat?
optionalnumberFormat?:ResolvedNumberFormat
The column's numberFormat (locale resolved): the editor is then a text
box in that locale (P-3) whose value is the TEXT; the engine reads it.
numberLocale?
optionalnumberLocale?:string
The grid's number locale ('tr-TR'), for reading a number box opened by
typing - or , on a column without numberFormat. Default 'en-US'.
onCancel
onCancel: () =>
void
Returns
void
onChange
onChange: (
value) =>void
Parameters
value
unknown
Returns
void
onCommit
onCommit: (
move) =>void
'blur': focus left the editor — commit, but do not take focus back.
Parameters
move
"none" | "down" | "blur"
Returns
void
onDisabledItem?
optionalonDisabledItem?: (item) =>void
lookup.onDisabledItem, bound to the cell (B.18).
Parameters
item
Returns
void
onPick?
optionalonPick?: (item) =>boolean
A pick that writes more than this cell (code + name, map): true when written.
Parameters
item
Returns
boolean
onPickerOpen?
optionalonPickerOpen?: (text) =>LookupItem|Promise<LookupItem|null> |null
lookup.onPickerOpen, bound to this cell (B.4.1).
Parameters
text
string
Returns
LookupItem | Promise<LookupItem | null> | null
onTab
onTab: (
direction) =>void
Tab / Shift+Tab: commit here and keep editing in the adjacent cell.
Parameters
direction
-1 | 1
Returns
void
options?
optionaloptions?: readonlyLookupItem[] |null
Choices for a lookup/select editor. null means the list is still being
fetched — the control renders disabled rather than empty, so the user
cannot commit a blank over a value while the options are in flight.
registerFlush?
optionalregisterFlush?: (flush) =>void
The engine's setEditFlusher (B.12.5): lookup and date editors register their leaving rule.
Parameters
flush
(() => boolean) | null
Returns
void
restore?
optionalrestore?:object
The cell's value before an editor opened by typing (B.15), for the lookup editor to put back.
value
value:
unknown
seeded?
optionalseeded?:boolean
The editor was opened by TYPING, so value is the character the user just
pressed. The caret goes after it instead of selecting it — selecting would
make the second keystroke erase the first.
seedText?
optionalseedText?:string
The editor was opened by typing a character that is not a value yet
(P-3.6): - or , on a number cell, a digit on a date cell. The box
starts with it, caret after it; value stays the cell's own until a
complete value is typed.
suspendBlurCommit?
optionalsuspendBlurCommit?: (on,restoreTo?) =>void
The grid's suspendBlurCommit, held while that picker is open.
Parameters
on
boolean
restoreTo?
() => HTMLElement | null
Returns
void
value
value:
unknown