Skip to content

ListViewProps

ListViewProps<T> = object

Defined in: packages/ui/src/types.ts:574

Props for the ListView composite component.

Composes PageContainerSlotProps, FilterBarProps, DataTableProps, EmptyStateProps, BulkAction, and pagination controls into a full page layout. This is the primary component @cfast/admin uses for every table view. Handles loading/empty/data state transitions automatically.

T = unknown

The row object type, forwarded to column rendering and selection.

optional actions: ClientDescriptor

Defined in: packages/ui/src/types.ts:601

Action descriptor for row-level actions.


optional breadcrumb: BreadcrumbItem[]

Defined in: packages/ui/src/types.ts:615

Breadcrumb trail items.


optional bulkActions: BulkAction[]

Defined in: packages/ui/src/types.ts:613

Bulk actions shown when rows are selected.


optional columns: ColumnShorthand<T>[]

Defined in: packages/ui/src/types.ts:599

Column definitions or key strings for the data table.


optional createAction: ClientDescriptor

Defined in: packages/ui/src/types.ts:607

Action descriptor for the create button.


optional createLabel: string

Defined in: packages/ui/src/types.ts:609

Label for the create button. Defaults to “Create”.


data: object

Defined in: packages/ui/src/types.ts:578

Paginated data with optional pagination controls.

optional currentPage: number

Current page number (offset pagination).

optional goToPage: (page) => void

Navigate to a specific page (offset pagination).

number

void

optional hasMore: boolean

Whether more items are available (cursor pagination).

optional isLoading: boolean

Whether data is currently being fetched.

items: T[]

Array of row objects to display.

optional loadMore: () => void

Load the next page of items (cursor pagination).

void

optional total: number

Total number of matching records.

optional totalPages: number

Total number of pages (offset pagination).


optional filters: FilterDef[]

Defined in: packages/ui/src/types.ts:603

Filter definitions for the FilterBar.


optional searchable: string[]

Defined in: packages/ui/src/types.ts:605

Column names that support full-text search.


optional selectable: boolean

Defined in: packages/ui/src/types.ts:611

Whether to enable row selection.


optional table: unknown

Defined in: packages/ui/src/types.ts:597

Drizzle table for column and filter type inference.


title: string

Defined in: packages/ui/src/types.ts:576

Page title displayed in the header.