Skip to content

CollectionEditViewProps

Defined in: packages/core/src/framework.ts:145

Props passed to the CollectionEditView component.

TCollectionSlug narrows to a literal when the caller supplies one — see the note on CollectionListViewProps.

ViewComponentMap

TCollectionSlug extends CollectionSlug = CollectionSlug

TDocument extends VexDocument = VexDocument

collection: TCollectionSlug

Defined in: packages/core/src/framework.ts:150

The slug of the collection whose fields will be rendered, resolved from useVexConfig().


documentId: string

Defined in: packages/core/src/framework.ts:155

The Convex document ID of the document being edited. Omit for new document creation — the form will be empty.


optional initialData?: TDocument | null

Defined in: packages/core/src/framework.ts:160

Pre-fetched document from the server for SSR hydration. null explicitly means “no document found”. undefined means “not loaded yet”.


optional initialPreviewPanelOpen?: boolean

Defined in: packages/core/src/framework.ts:166

The live-preview panel’s initial open state, read server-side (Decision 51) from the vex-admin:<collection> cookie’s livePreview.panelOpen field (or the collection’s admin.livePreview.defaultOpen when no cookie exists) by NextAdminPage.


optional initialPreviewPanelSize?: number

Defined in: packages/core/src/framework.ts:173

The live-preview split’s handle position — the form column’s percentage of the pane — read server-side (Decision 51) from the vex-admin:<collection> cookie’s livePreview.panelSize field by NextAdminPage, so a remembered width renders on the first paint instead of snapping into place after hydration.


optional initialPreviewUrl?: string

Defined in: packages/core/src/framework.ts:178

The preview URL resolved server-side for a { server } resolver, so the iframe’s first paint needs no Convex round trip.