LookupGrid
LookupGrid, LookupGridProps: generated from the source of active-grid.
Exported by @workspace/. Generated from the package source; part of the index of every export.
Lookup Grid#
Generic over TData extends Lookup; the props below name it.
Props
- Type
GridColumn Def<TData, unknown>[]
Column definitions for the lookup grid.
- Type
boolean
Whether the dialog is open. Fully controlled.
- Type
string
UiDialog title shown in the header.
- Type
GridColumn Types<TData>
Reusable column type presets (date, currency, badge, etc.).
- Type
TData[]
- Type
string
Optional dialog description. Rendered as sr-only if omitted.
- Type
ServerFetch Function<TData>
- Type
(row: TData) => string
Custom row ID accessor. Default: (row) => row.id
- Type
number
Fixed height of the grid inside the dialog in pixels. Default: 400.
- Type
string
Unique grid ID for internal state. Default: 'lookup-grid'.
- Type
number
Initial page size. Default: 10.
- Type
(row: TData) => boolean
Predicate to disable selection for specific rows.
- Type
ValuePresentation
This lookup's presentation override; else the nearest <Grid.
- Type
string
Maximum width of the dialog. Default: '72rem'.
- Type
"client""server"
- Type
number[]
Page size options for pagination. Default: [10, 25, 50].
- Type
string
Placeholder text for the search input.
- Type
GridServer Capabilities
Server-declared capability map (resource-backed lookups). Forwarded to the inner ActiveGrid; absent = selection behavior is unchanged.
- Type
GridTranslate Function
This lookup's translator override; else the nearest <Grid.
Events
Called by the component when something happens.
- Type
(open: boolean) => void
Callback when the dialog open state changes.
- Type
(row: TData) => void
Callback when a row is selected. Called on confirm button or double-click.
Takes only the props listed.
Types#
Discriminated union: server (default) or client mode.
The props of Lookup, each described in its prop list on this page.
type LookupGridProps<TData extends LookupRecord> =
| (LookupGridBaseProps<TData> & {
mode?: 'server';
fetchFn: ServerFetchFunction<TData>;
data?: never;
})
| (LookupGridBaseProps<TData> & {
mode: 'client';
data: TData[];
fetchFn?: never;
});