Skip to content

MediaCollectionListView

MediaCollectionListView(props): Element

Defined in: packages/react/src/media/MediaCollectionListView.tsx:93

Media collection list view.

The media counterpart to CollectionListView. Renders the same data-table UI (live-fetched via find + Convex subscription, server initialData for an instant first paint) with two media-specific differences:

  1. A leading preview column shows a thumbnail of each media file (from the src field), falling back to a placeholder when no URL is present.
  2. The create flow opens the media upload modal (an upload dropzone) instead of a field form, and the header action reads “Upload” rather than “New”.

Renders the content area only — wrap it in AdminLayout.

Split the same way CollectionListView is (Decision 49 follow-up): this outer half is sync-only (permission/column setup), rendering the real toolbar/table-frame shell immediately; the data-dependent table body is the inner MediaCollectionListViewData, mounted inside its own <Suspense fallback={<DataTable isPending .../>}> so a server-streamed, un-awaited prefetch resolves via React’s own SSR resumption (a plain useQuery reading an un-awaited server prefetch would otherwise hydration-mismatch — see CollectionListView.tsx’s own doc comment for the full explanation).

MediaCollectionListViewProps

View props.

Element

The media data table, a not-found message, or an empty state.

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

<MediaCollectionListView collection="images" />