View as Markdown

API reference: @salmonui/data-grid/engine

ColumnLookupinterface

import type { ColumnLookup } from '@salmonui/data-grid/engine';

Also exported from @salmonui/data-grid/engine/lookup.

interface ColumnLookup {
    readonly data: readonly unknown[] | LookupSource;
    readonly keyField?: string;
    readonly displayField: string;
}

column.lookup: the cell holds a value matched against keyField of the lookup rows; the grid shows, sorts, filters, searches, and groups by displayField.

ColumnLookup members (3)
NameSignatureDescription
datareadonly data: readonly unknown[] | LookupSource;

Lookup rows, or a source that loads them by value (@salmonui/data createLookup, createJsonLookup).

keyFieldoptionalreadonly keyField?: string;

Field of the lookup rows matched against the cell value. Default: the column field. Dot paths allowed.

displayFieldreadonly displayField: string;

Field of the lookup rows displayed. Dot paths allowed.