ReferenceArrayInput

Chooses several related records by their foreign keys.

Installation

pnpm dlx shadcn@latest add @chelone/reference-array-input

Chooses several related records by their foreign keys.

Props

PropTypeDefaultDescription
childrenReactElement<unknown, string | JSXElementConstructor<any>>—The child multi-select input rendered against the reference choices context. Defaults to `<AutocompleteArrayInput>`.
debounceMsnumber—Debounce delay (ms) for filter-driven choices refetches.
filterFilterPayload—Permanent filter merged OVER the dynamic filter for every choices fetch.
lookupKeystring—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 } })`.
pagenumber—Choices page (1-based).
perPagenumber—Choices per page.
referencestring—The referenced resource choices are fetched from (e.g. `"tags"`).
sortSortPayload—Sort applied to the choices query.
sourcestring—The FK-array field on the current record (e.g. `"tag_ids"`).