Skip to main content

Module list

Module list 

Source
Expand description

Descriptor-driven list views.

A ListConfig describes a table and the columns to show. A generic handler renders it, fetching rows with dynamic SQL built from the descriptor. This is the first slice of the descriptor system: admin screens are data, rendered by generic code, not hand-written per entity.

The admin is inherently generic, so unlike the typed, compile-time-checked queries in laterite-auth, list queries are built and checked at runtime.

Structs§

CellCx
The per-cell state a column type renders from: the raw (text-cast) value, the display timezone, and the locale for date month/day names.
CellView
One rendered cell and the class its column’s alignment gives it.
CellVm
A rendered cell’s serialisable payload: raw value, display text, and any richer data (a status pill’s slug), so an override presents the same data.
ColumnChoice
One row of the column picker.
ColumnHead
One column header: its label, the field a click sorts by, the direction that click asks for, and the direction it is sorted in now (empty when it is not).
ColumnTypeReg
A column type a module contributes, so a list can render a cell the framework has no built-in for (a rating, a map thumbnail, a currency amount).
FilterOption
One value a select filter offers.
FilterOptionView
FilterView
One rendered filter control.
ListColumn
ListConfig
A list view descriptor: which table, which columns, default ordering, page size, and (optionally) where per-row edit links point.
ListFilter
One filter offered above a list: a column, its label, and what it offers.
ListPage
Display-ready rows plus the total row count for the pager.
ListParams
Query-string parameters for a list view.
RenderedRow
A row as the template receives it: each cell already rendered.
ReorderConfig
The order rows keep of their own, held in an integer column (not null, default 0). Keys are spaced by a thousand so a move rewrites one row; a move into a closed gap renumbers the list.
RowView
One rendered row: its id (for edit links) and its display cells.
SearchConfig
The list’s search box. On by default, over the columns marked searchable.
ToolbarButton
A resource declares its own; the framework contributes New and the export menu the same way, so the toolbar is one list of buttons rather than a hardcoded bar with special cases.
ToolbarView
One rendered toolbar button.
TreeConfig
Rows that form a tree through a parent column (adjacency): the list opens on the rows with no parent, each row with children expands in place, and a row can be moved under another parent.
ValueLabel
What a stored value reads as in a cell.

Enums§

Align
One column of a list view: the source field, its display label, and its column-type key (resolved through the column-type registry). How a column’s cells and header align.
RowClick
What clicking a list row does.
SortDir

Traits§

ColumnType
A column type: how a list cell renders. The list counterpart of a field type, sharing Markup and the override resolver (Surface::Column).

Type Aliases§

ColumnRegistry
The column-type registry, keyed by ColumnType::view_key.