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
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| iconOverride | Object | null | A partial icon registry ({ [componentName]: { [iconName]: { component, props } } }) merged with inherited and default icon entries; scopes icon overrides to this component and its descendants. | |
| themeOverride | String|Object|Array | null | A partial theme object merged with the component's default theme; accepts a class string, class array, or theme object. | |
| app | string | yes | Django app label that owns the model. | |
| model | string | yes | Django model name used to resolve API endpoints and configuration. | |
| listFields | array | [] | Field names to include as list columns; uses the model config default when empty. | |
| displayFields | object | {} | Map of field names to display configuration overrides (label, component, etc.). | |
| columnComponents | object | {} | 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. | |
| columnProps | object | {} | Per-field props forwarded to the resolved list column adapter. | |
| relatedObjectsRules | object | {} | Rules mapping related object keys to fetch data alongside each list row. | |
| calculatedObjectsRules | object | {} | Rules mapping calculated object keys to derive computed data alongside each list row. | |
| params | object | {} | Additional query parameters merged into every API request. | |
| tableBreakpoint | string | "lg" | Tailwind breakpoint at which the layout switches from card to table view. | |
| extraFieldObjects | array | [ { name: `selected_`, extra: true, label: "Selected", }, ] | Extra synthetic field objects appended to the field list (e.g. the selected_ checkbox column). | |
| filterables | array | undefined | List of field names to show as filters; overrides the server-provided list when set. | |
| filterableDetails | object | {} | Per-field filter detail overrides merged with server-provided configuration. | |
| pageSizeOptions | array | [...DEFAULT_PAGE_SIZE_OPTIONS] | Rows-per-page options offered by the pagination footer; the final "all" entry loads every page at once. | |
| defaultPageSize | number|string | DEFAULT_PAGE_SIZE | Initial rows-per-page when no preference is stored (a number, or "all"). A stored preference overrides it. | |
| showTotalRecordNum | boolean | true | When true, displays the total record count in the pagination bar. | |
| allowColumnHiding | boolean | false | When true, shows a column-visibility selector so users can hide individual columns. | |
| primaryActions | array | undefined | Action names promoted to the filled hero CTA in the page title; defaults to the create action. |
Slots
| Name | Scoped | Description |
|---|---|---|
targetless-action-buttons | yes | |
targetless-action-button | yes | Replaces an individual targetless action button. |
search | yes | |
columns-select | yes | |
columns-select-value-label | ||
additional-errors | ||
before-list | ||
`field(${name})` | yes | |
row-after-objects | yes | |
bulk-action-button | yes | Replaces an individual bulk action button. |
workflow-action-button | yes | Replaces an individual workflow/transition action button. |
Events
| Name | Description |
|---|---|
selected | Emitted once on mount with a live ref to the selected primary keys (actions.selectedObjects). |
sorted | Emitted once on mount with a live ref to the active sort order (sort.sorting.state.sorted). |
objects | Emitted once on mount with a live ref to the raw fetched objects (list.instanceList.state.objects). |
order | Emitted once on mount with a live ref to the current object ordering (list.instanceList.state.order). |
loading | Emitted once on mount with a live ref to the combined loading state (list.loading). |
related-objects | Emitted once on mount with a live ref to the fetched related objects. |
calculated-objects | Emitted once on mount with a live ref to the fetched calculated objects. |
filtered | Emitted once on mount with a live ref to the active-filter list (filter.state.addedFilters). |
query-change | Emitted once on mount with a live ref to the current route query. |
hide-filter-form | Forwarded from FilterGroup when a filter form popover should close. |
Source
client/lib/views/ViewList.vue