ReferenceArrayInput
Chooses several related records by their foreign keys.
Installation
pnpm dlx shadcn@latest add @chelone/reference-array-inputChooses several related records by their foreign keys.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactElement<unknown, string | JSXElementConstructor<any>> | — | The child multi-select input rendered against the reference choices context. Defaults to `<AutocompleteArrayInput>`. |
| debounceMs | number | — | Debounce delay (ms) for filter-driven choices refetches. |
| filter | FilterPayload | — | Permanent filter merged OVER the dynamic filter for every choices fetch. |
| lookupKey | string | — | The field on the referenced record the values match. `"id"` (default) resolves the selected records via `getMany`; any other key resolves them via `getList({ filter: { [lookupKey]: values } })`. |
| page | number | — | Choices page (1-based). |
| perPage | number | — | Choices per page. |
| reference | string | — | The referenced resource choices are fetched from (e.g. `"tags"`). |
| sort | SortPayload | — | Sort applied to the choices query. |
| source | string | — | The FK-array field on the current record (e.g. `"tag_ids"`). |