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-field

Resolves an array of foreign keys with getMany, then pages, sorts and filters the result on the client.

Props

PropTypeDefaultDescription
childrenReactNode—The list-rendering children (a `DataTable`, etc.).
filterFilterPayload—Client-side filter for the resolved list.
perPagenumber—Client-side page size for the resolved list.
recordRecordType—The record to read the FK array off. Defaults to the ambient record.
referencestring—The referenced resource the ids point at (e.g. `"tags"`).
sortSortPayload—Client-side sort for the resolved list.
sourcestring—The FK-array field on the current record (e.g. `"tag_ids"`).