Documentation

@kanunilabs/datagrid-react


@kanunilabs/datagrid-react / lookupLabel

Function: lookupLabel()

lookupLabel<TRow>(def, value): string | null

Defined in: datagrid-core/dist/index.d.ts:1174

Label for a stored value, or null when this column does not resolve one — not a lookup column, a dynamic list (see ColumnLookup), or a value that is not in the list.

Null rather than a fallback string on purpose: the caller already has a formatter chain to fall through to, and inventing String(value) here would shadow a valueFormatter the app deliberately wrote.

Type Parameters

TRow

TRow = GridRowData

Parameters

def

GridColumnDef<TRow> | undefined

value

unknown

Returns

string | null