Documentation

@kanunilabs/datagrid-react-enterprise


@kanunilabs/datagrid-react-enterprise / GridCellEditorProps

Interface: GridCellEditorProps

Properties

allowCustom?

optional allowCustom?: boolean

Let the user type a value outside options.


ariaLabel?

optional ariaLabel?: string

Accessible name for the editor, used by the lookup combo box.


dataType

dataType: GridDataType | undefined


dateFormat?

optional dateFormat?: 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.


matchMode?

optional matchMode?: LookupMatchMode

How typed text narrows the lookup list. Default 'startsWith'.


onCancel

onCancel: () => void

Returns

void


onChange

onChange: (value) => void

Parameters

value

unknown

Returns

void


onCommit

onCommit: (move) => void

Parameters

move

"none" | "down"

Returns

void


onTab

onTab: (direction) => void

Tab / Shift+Tab: commit here and keep editing in the adjacent cell.

Parameters

direction

-1 | 1

Returns

void


options?

optional options?: readonly LookupItem[] | 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.


seeded?

optional seeded?: 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.


value

value: unknown