Documentation

@kanunilabs/datagrid-react-enterprise


@kanunilabs/datagrid-react-enterprise / LookupBoxProps

Interface: LookupBoxProps

Properties

allowCustom?

optional allowCustom?: boolean


ariaLabel

ariaLabel: string

The field's accessible name (its label's text).


autoCompleteSingle?

optional autoCompleteSingle?: boolean

Pick the one item left by itself. Default true; false is the strict data-entry rule.


buttonOrder?

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

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


className?

optional className?: string


dark?

optional dark?: boolean

Dark tokens, as the grid's dark (B.9.13).


density?

optional density?: GridDensity


describedBy?

optional describedBy?: string


disabled?

optional disabled?: boolean


display?

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

What a linked box shows and completes against: 'code' (default), 'name', 'both' (B.9.1).


dropButton?

optional dropButton?: boolean

The ▾ button. Default true (a form field has no other way to show it is a list).


dropLabel?

optional dropLabel?: string


error?

optional error?: string | null

A message under the box, read out (role="alert"), e.g. the search failed.


hoverHighlights?

optional hoverHighlights?: boolean

Does the pointer move the highlight that Tab writes? Default false here (B.9.6).


id?

optional id?: string


invalid?

optional invalid?: boolean


items

items: readonly LookupItem[] | null

The list; null while it is on its way (B.9.8, same as loading).


linked?

optional linked?: boolean

A code + name list: the box shows the code, the list both, typing matches either.


listColumns?

optional listColumns?: readonly LookupListColumn[]


listResizable?

optional listResizable?: boolean


loading?

optional loading?: boolean

The list is on its way: typing is kept and checked once it arrives; Enter picks nothing.


locale?

optional locale?: string

"No match" and the button labels: the grid's twelve languages. Default 'en'.


matchFold?

optional matchFold?: LookupMatchFold


matchMode?

optional matchMode?: LookupMatchMode | { code?: LookupMatchMode | undefined; name?: LookupMatchMode | undefined; }

One mode, or per field ({ code: 'startsWith', name: 'contains' }). Default 'startsWith'.


messages?

optional messages?: Partial<GridDictionary>


name?

optional name?: string

Form wiring, on the box itself (B.9.11). id (below) goes to the box too.


onChange

onChange: (value, item) => void

A pick (or a cleared / free-text value with allowCustom): the value and its item, or null.

Parameters

value

unknown

item

LookupItem | null

Returns

void


onNoMatch?

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

Leaving with typed text that picks nothing. Default 'revert' (unlike the grid's 'keep-open'): a form field must not hold focus hostage — the text goes and the value stays.


onPickerOpen?

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

The "…" button and Ctrl+Enter: open your own picker with what is typed.

Parameters

text

string

Returns

LookupItem | Promise<LookupItem | null> | null


openHighlight?

optional openHighlight?: "none" | "current"

'current': the list opens on the current item, or the first (Tekax, 2026-11-12). Default 'none'.


openOnFocus?

optional openOnFocus?: boolean

Focusing or clicking the box opens the list. Default false (Tekax B.9.3).


palette?

optional palette?: GridPaletteName


pickerLabel?

optional pickerLabel?: string

The buttons' accessible names (B.9.14).


pickerTabStop?

optional pickerTabStop?: boolean

The "…" button is a Tab stop (B.9.14).


portalContainer?

optional portalContainer?: PortalContainer

Where the list is drawn (a modal's container). Default <body>.


required?

optional required?: boolean


restrictInput?

optional restrictInput?: boolean


style?

optional style?: CSSProperties


testId?

optional testId?: string


theme?

optional theme?: GridThemeName


typeAhead?

optional typeAhead?: boolean


value

value: unknown

What the field holds (an item's value), or null.