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.
Type Parameters
Section titled “Type Parameters”TCollectionSlug
Section titled “TCollectionSlug”TCollectionSlug extends string = string
Parameters
Section titled “Parameters”CollectionEditViewProps<TCollectionSlug>
View props.
Returns
Section titled “Returns”Element
The edit form, or a not-found message when collection does
not resolve, or when the document cannot be loaded.
Throws
Section titled “Throws”Never — resolution failure renders a not-found message instead of throwing.
Example
Section titled “Example”<CollectionEditView collection="posts" documentId="k573abc..." initialData={serverDoc} />