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.
themeOverrideObjectnullA partial ThemeObject keyed by component name, merged over this component's theme and provided to descendants.
appstringyesDjango app label that owns the model.
modelstringyesDjango model name used to resolve API endpoints and configuration.
listFieldsarray[]Field names to fetch; uses the displayFields keys, then 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 function, 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.
scopesobject{}Declares which params keys are shown as scopes in the constraints band, keyed by params key: { [key]: { label?, clearable? } }. A declared key is shown while params carries a value for it. label defaults to the filter's metadata label (or the key) with its value; clearable defaults to true. Clearing emits clear-scope; the caller removes those keys from params. Undeclared params keys stay plain request parameters.
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.
showTotalRecordNumbooleanundefinedWhen true, displays the total record count in the pagination bar. Overrides the model config's showTotalRecordNum; when unset, the model config decides, defaulting to true.
allowColumnHidingbooleanundefinedWhen true, shows a column-visibility selector so users can hide individual columns. Overrides the model config's allowColumnHiding; when unset, the model config decides, defaulting to false.
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.
clear-scopeEmitted with { name, keys } when the reader clears a params key declared through the scopes prop. The prop is left unchanged: the caller removes keys from params, which removes the scope from the request and the constraints band.

Full event reference

Source ​

client/lib/views/ViewList.vue