---
id: "packages/active-grid/api/lookup-grid"
title: "LookupGrid"
description: "LookupGrid, LookupGridProps: generated from the source of active-grid."
url: "/packages/active-grid/api/lookup-grid"
locale: "en"
revision: "g0mvjxwj5c-88bdbe1c:lookup-grid"
---

# LookupGrid

Exported by `@workspace/active-grid`. Generated from the package source; part of [the index of every export](/packages/active-grid/api).

## `LookupGrid`

| Prop | Type | Required | Description |
| --- | --- | --- | --- |
| `columns` | `GridColumnDef<TData, unknown>[]` | yes | Column definitions for the lookup grid. |
| `onOpenChange` | `(open: boolean) => void` | yes | Callback when the dialog open state changes. |
| `onSelect` | `(row: TData) => void` | yes | Callback when a row is selected. Called on confirm button or double-click. |
| `open` | `boolean` | yes | Whether the dialog is open. Fully controlled. |
| `title` | `string` | yes | UiDialog title shown in the header. |
| `columnTypes` | `GridColumnTypes<TData>` | no | Reusable column type presets (date, currency, badge, etc.). |
| `data` | `TData[]` | no |  |
| `description` | `string` | no | Optional dialog description. Rendered as sr-only if omitted. |
| `fetchFn` | `ServerFetchFunction<TData>` | no |  |
| `getRowId` | `((row: TData) => string)` | no | Custom row ID accessor. Default: (row) => row.id |
| `gridHeight` | `number` | no | Fixed height of the grid inside the dialog in pixels. Default: 400. |
| `gridId` | `string` | no | Unique grid ID for internal state. Default: 'lookup-grid'. |
| `initialPageSize` | `number` | no | Initial page size. Default: 10. |
| `isRowSelectable` | `((row: TData) => boolean)` | no | Predicate to disable selection for specific rows. |
| `locale` | `ValuePresentation` | no | This lookup's presentation override; else the nearest `<GridDefaults locale>`. |
| `maxWidth` | `string` | no | Maximum width of the dialog. Default: '72rem'. |
| `mode` | `"client" \| "server"` | no |  |
| `pageSizeOptions` | `number[]` | no | Page size options for pagination. Default: [10, 25, 50]. |
| `searchPlaceholder` | `string` | no | Placeholder text for the search input. |
| `serverCapabilities` | `GridServerCapabilities` | no | Server-declared capability map (resource-backed lookups). Forwarded to the inner ActiveGrid; absent = selection behavior is unchanged. |
| `t` | `GridTranslateFunction` | no | This lookup's translator override; else the nearest `<GridDefaults t>`. |

## Types

**LookupGridProps**

```ts
type LookupGridProps<TData extends LookupRecord> =
  | (LookupGridBaseProps<TData> & {
      mode?: 'server';
      fetchFn: ServerFetchFunction<TData>;
      data?: never;
    })
  | (LookupGridBaseProps<TData> & {
      mode: 'client';
      data: TData[];
      fetchFn?: never;
    });
```

Discriminated union: server (default) or client mode.
