Documentation

@kanunilabs/datagrid-react


@kanunilabs/datagrid-react / GridLookupEditorProps

Interface: GridLookupEditorProps

Properties

allowCustom?

optional allowCustom?: boolean

Let text that matches nothing become the value. Default false.


ariaLabel?

optional ariaLabel?: string


autoCompleteSingle?

optional autoCompleteSingle?: boolean

Complete typed text to the one item left / an exact label on leaving. Default true. False: the "pick from the list" rule (K-3, see the top).


autoFocus?

optional autoFocus?: boolean

Take focus on mount. True for a cell editor — it opened BECAUSE the user asked to edit that one cell. False in row mode, where every editable cell mounts an editor at once and each would grab focus in turn, landing the caret on whichever lookup happened to render last.


buttonOrder?

optional buttonOrder?: "drop-first" | "picker-first"

'picker-first': [box][…][▾] (B.9.14). Default [box][▾][…].


clearable?

optional clearable?: boolean

Text emptied and left: the value becomes null (B.9.7, LookupBox). Default false.


codeMatchMode?

optional codeMatchMode?: LookupMatchMode

How typed text matches a linked list's code (value). Default 'startsWith'.


columnId?

optional columnId?: string

Stamped as data-column-id, so callers can find one field of a row.


commitOnPick?

optional commitOnPick?: boolean

Whether picking an item counts as committing. True for a cell editor — the pick IS the edit. False in row/form mode, where picking fills one field of a record the user is still filling in and only Save ends it.


describedBy?

optional describedBy?: string


disabled?

optional disabled?: boolean

A read-only field (LookupBox): the box and its buttons do nothing.


display?

optional display?: "both" | "code" | "name"

What the box shows and completes against (lookup.display, B.9.1): 'code', 'name' or 'both'. Default: 'code' for a linked list, the label otherwise.


dropButton?

optional dropButton?: boolean

A ▾ button that opens and closes the list (lookup.dropButton, B.4.2).


dropLabel?

optional dropLabel?: string


hoverHighlights?

optional hoverHighlights?: boolean

Does the pointer over an item move the highlight (what Enter, Tab and leaving write)? Default true. False (B.9.6, LookupBox's default): the pointer only marks the item it is over; the keyboard's highlight stays.


inputId?

optional inputId?: string

On the BOX (B.9.11): its id (for <label for>), form name, required, described-by.


invalid?

optional invalid?: boolean


linked?

optional linked?: boolean

A code + name list (lookup.linkedColumns, P-5.2): each item shows its code (value) and name (label), typing matches either, and the box shows the code.


listColumns?

optional listColumns?: readonly LookupListColumn[]

The list as a table with a header row (lookup.listColumns, B.4.2).


listResizable?

optional listResizable?: boolean

A grip on the open list's corner to resize it (lookup.listResizable, B.4.3).


loading?

optional loading?: boolean

The list is on its way (B.9.8): typing is not refused, Enter picks nothing, the list says so; once it arrives the text is checked against it (cut back to what still matches) and completed.


matchFold?

optional matchFold?: LookupMatchFold

How typed text and item text are folded before they are compared (lookup.matchFold, P-13). Default 'case' — the editor's old behaviour.


matchMode?

optional matchMode?: LookupMatchMode

Prefix (default) or substring — for the label (the name of a linked list).


name?

optional name?: string


onBlurCommit?

optional onBlurCommit?: () => void

Focus left the box for somewhere that is not its list: commit (the cell editor's click-away, P-10). Left out (row mode, the form), a blur only settles the typed text, as before.

Returns

void


onCancel

onCancel: () => void

Returns

void


onChange

onChange: (value) => void

Parameters

value

unknown

Returns

void


onCommit

onCommit: () => void

Commit (Enter / picking an item), handed back to the engine.

Returns

void


onNoMatch?

optional onNoMatch?: "revert" | "keep-open"

Typed text that picks nothing (closed list): Enter keeps the editor open and announces it either way; Tab stays ('keep-open', default) or drops the text and moves on ('revert').


onPick?

optional onPick?: (item) => boolean

Picking an item writes it: answer true when written. Left out, a pick is onChange(item.value). A code + name pick writes several columns in one step through this (P-5.2); false (a locked row) keeps the editor open.

Parameters

item

LookupItem

Returns

boolean


onPickerOpen?

optional onPickerOpen?: (text) => LookupItem | Promise<LookupItem | null> | null

lookup.onPickerOpen (Tekax B.4.1), bound to the row: a "…" button and Ctrl+Enter open the app's picker; its item is picked like a list item.

Parameters

text

string

Returns

LookupItem | Promise<LookupItem | null> | null


onTab?

optional onTab?: (shiftKey) => void

Tab moves to the adjacent cell; the engine owns that.

Parameters

shiftKey

boolean

Returns

void


openHighlight?

optional openHighlight?: "none" | "current"

lookup.openHighlight: 'current' opens on the current item, or the first (Tekax, 2026-11-12).


openOnEdit?

optional openOnEdit?: boolean

Open the list as soon as the editor mounts (lookup.openOnEdit, P-11). Only for an editor that takes focus (autoFocus) — in a row or form every field would open its list at once.


openOnFocus?

optional openOnFocus?: boolean

Focusing or clicking the box opens the list. Default false (Tekax B.9.3): the list opens on typing, ▾, F4, Alt+Down, Space (editKeys.space) or, with openOnEdit, when the editor starts — so a Tab into a form field or an editor opened with Enter shows the value, not a list over the rows.


options

options: readonly LookupItem[]


passKeys?

optional passKeys?: boolean

Keys the box does not use (Insert, Ctrl+Delete, F-keys) go on to the page (B.9.9, LookupBox).


pickerLabel?

optional pickerLabel?: string

The buttons' accessible names (B.9.14): default "Choose from the full list" and the field's name.


pickerTabStop?

optional pickerTabStop?: boolean

The "…" button is a Tab stop; Enter, Space, F4 and Alt+Down on it open the picker (B.9.14).


registerFlush?

optional registerFlush?: (flush) => void

The grid's setEditFlusher (B.12.5 / B.9.19): the editor registers its leaving rule, so a commit the editor did not start (stopEditing(), ctx.commit(), a press elsewhere) writes what Tab would.

Parameters

flush

(() => boolean) | null

Returns

void


required?

optional required?: boolean


restore?

optional restore?: object

The cell's value before the editor was opened by TYPING (seeded), when the session's value is the opening letter (B.15): an Esc that closes the list, emptied text or a leave with nothing picked puts this back, so the letter never becomes the value. Left out, nothing is restored.

value

value: unknown


restrictInput?

optional restrictInput?: boolean

Refuse typing that matches no item (lookup.restrictInput, P-12). Deleting is always free; ignored with allowCustom.


seeded?

optional seeded?: boolean

The editor was opened by TYPING and value is that one character: the box starts with it as the typed text (list filtered by it, caret after it). Acts only together with openOnEdit.


suspendBlurCommit?

optional suspendBlurCommit?: (on, restoreTo?) => void

The grid's suspendBlurCommit (P-4.1): held while the picker is open, so focus going to the app's dialog neither commits the cell nor sends the row.

Parameters

on

boolean

restoreTo?

() => HTMLElement | null

Returns

void


testId?

optional testId?: string


typeAhead?

optional typeAhead?: boolean

Complete while typing (lookup.typeAhead, P-17), like a Delphi lookup combo: the first item whose label STARTS with the text completes in the box (the added part selected) and is highlighted; with no such item the first match is only highlighted. Enter, Tab and leaving pick the highlighted item; no match picks nothing. Ignored with allowCustom.


value

value: unknown