Skip to content

CollectionEditView

CollectionEditView<TCollectionSlug>(props): Element

Defined in: packages/react/src/collections/editView/CollectionEditView.tsx:109

Collection document edit form.

Fetches the document when editing via vexConvexApi.get (TanStack Query + Convex subscription), initialises a useFieldsForm instance with the current field values, and renders an <AppForm> with one input component per field. Submits via vexConvexApi.update. Field inputs connect to the form through AppFormContext — no controller prop needed.

When the collection declares admin.livePreview, a “Show preview” toggle splits the view into a resizable form/preview pair. Below the mobile breakpoint it opens instead as a bottom-sheet overlay (LivePreviewMobileOverlay); narrowing past that breakpoint while the split panel is open auto-closes it (remembered so widening back reopens it) rather than letting it render as a full-screen takeover.

TCollectionSlug extends string = string

CollectionEditViewProps<TCollectionSlug>

View props.

Element

The edit form, or a not-found message when collection does not resolve, or when the document cannot be loaded.

Never — resolution failure renders a not-found message instead of throwing.

<CollectionEditView collection="posts" documentId="k573abc..." initialData={serverDoc} />