ReferenceArrayField
Resolves an array of foreign keys with getMany, then pages, sorts and filters the result on the client.
Installation
pnpm dlx shadcn@latest add @chelone/reference-array-fieldResolves an array of foreign keys with getMany, then pages, sorts and filters the result on the client.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | The list-rendering children (a `DataTable`, etc.). |
| filter | FilterPayload | — | Client-side filter for the resolved list. |
| perPage | number | — | Client-side page size for the resolved list. |
| record | RecordType | — | The record to read the FK array off. Defaults to the ambient record. |
| reference | string | — | The referenced resource the ids point at (e.g. `"tags"`). |
| sort | SortPayload | — | Client-side sort for the resolved list. |
| source | string | — | The FK-array field on the current record (e.g. `"tag_ids"`). |