View as Markdown

API reference: @salmonui/data-grid/engine

CompiledLookupinterface

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

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

interface CompiledLookup {
    readonly keyField: string;
    readonly displayField: string;
    readonly type: ColumnType;
    readonly data: readonly unknown[] | LookupSource;
    rawValue(row: unknown): unknown;
    display(key: unknown): unknown;
}

CompiledColumn.lookup of a lookup column (filled by the lookup module).

CompiledLookup members (6)
NameSignatureDescription
keyFieldreadonly keyField: string;
displayFieldreadonly displayField: string;
typereadonly type: ColumnType;

Display value type: inferred from local lookup rows, 'string' for remote lookups.

datareadonly data: readonly unknown[] | LookupSource;
rawValuerawValue(row: unknown): unknown;

Raw key of a row (the column's original accessor). engine.getCellValue returns this.

displaydisplay(key: unknown): unknown;

Display value of a key, or null when unknown (remote: may queue a load).