Skip to content

ViewList

Overview

Full-page list view for a Django model. Renders a paginated, sortable, and searchable data grid with support for column hiding, filter groups, bulk actions, targetless actions, workflow transitions, column totals, and switching between paginated and show-all display. Persists sort order, visible columns, and active filters across page visits via the list preference store.

Theme entry: ViewList

Props

NameTypeRequiredDefaultDescription
iconOverrideObjectnullA partial icon registry ({ [componentName]: { [iconName]: { component, props } } }) merged with inherited and default icon entries; scopes icon overrides to this component and its descendants.
themeOverrideString|Object|ArraynullA partial theme object merged with the component's default theme; accepts a class string, class array, or theme object.
appstringyesDjango app label that owns the model.
modelstringyesDjango model name used to resolve API endpoints and configuration.
listFieldsarray[]Field names to include as list columns; uses the model config default when empty.
displayFieldsobject{}Map of field names to display configuration overrides (label, component, etc.).
columnComponentsobject{}Per-field list column adapter overrides. Each value is a component, a () => component loader, or a string key into availableColumns. Takes precedence over modelConfig.config.columnComponents and type defaults; a consumer #field(<col>) slot still wins over both.
columnPropsobject{}Per-field props forwarded to the resolved list column adapter.
relatedObjectsRulesobject{}Rules mapping related object keys to fetch data alongside each list row.
calculatedObjectsRulesobject{}Rules mapping calculated object keys to derive computed data alongside each list row.
paramsobject{}Additional query parameters merged into every API request.
tableBreakpointstring"lg"Tailwind breakpoint at which the layout switches from card to table view.
extraFieldObjectsarray[ { name: `selected_`, extra: true, label: "Selected", }, ]Extra synthetic field objects appended to the field list (e.g. the selected_ checkbox column).
filterablesarrayundefinedList of field names to show as filters; overrides the server-provided list when set.
filterableDetailsobject{}Per-field filter detail overrides merged with server-provided configuration.
pageSizeOptionsarray[...DEFAULT_PAGE_SIZE_OPTIONS]Rows-per-page options offered by the pagination footer; the final "all" entry loads every page at once.
defaultPageSizenumber|stringDEFAULT_PAGE_SIZEInitial rows-per-page when no preference is stored (a number, or "all"). A stored preference overrides it.
showTotalRecordNumbooleantrueWhen true, displays the total record count in the pagination bar.
allowColumnHidingbooleanfalseWhen true, shows a column-visibility selector so users can hide individual columns.
primaryActionsarrayundefinedAction names promoted to the filled hero CTA in the page title; defaults to the create action.

Slots

NameScopedDescription
targetless-action-buttonsyes
targetless-action-buttonyesReplaces an individual targetless action button.
searchyes
columns-selectyes
columns-select-value-label
additional-errors
before-list
`field(${name})`yes
row-after-objectsyes
bulk-action-buttonyesReplaces an individual bulk action button.
workflow-action-buttonyesReplaces an individual workflow/transition action button.

Full slot reference

Events

NameDescription
selectedEmitted once on mount with a live ref to the selected primary keys (actions.selectedObjects).
sortedEmitted once on mount with a live ref to the active sort order (sort.sorting.state.sorted).
objectsEmitted once on mount with a live ref to the raw fetched objects (list.instanceList.state.objects).
orderEmitted once on mount with a live ref to the current object ordering (list.instanceList.state.order).
loadingEmitted once on mount with a live ref to the combined loading state (list.loading).
related-objectsEmitted once on mount with a live ref to the fetched related objects.
calculated-objectsEmitted once on mount with a live ref to the fetched calculated objects.
filteredEmitted once on mount with a live ref to the active-filter list (filter.state.addedFilters).
query-changeEmitted once on mount with a live ref to the current route query.
hide-filter-formForwarded from FilterGroup when a filter form popover should close.

Full event reference

Source

client/lib/views/ViewList.vue

Documents matching: server v3.0.0a1.post1client v3.0.0-alpha.2