Skip to content

ListDisplayModel

ListDisplayModel = { amount?: string[]; badge?: string; card?: string; dots?: string[]; favorite?: CardFavoriteModel; flags?: string[]; footer?: string[]; icon?: string; image?: string; kind: "cards"; label?: string; meta?: string[]; name: string; photos?: CardPhotosModel; subtitle?: string; title?: string; } | { approximate?: string; area?: string; cards?: string; defaultRadius?: number; exact?: string; icon?: string; kind: "map"; label?: string; latitude: string; longitude: string; name: string; radius?: string; } | { badge?: string; by: string; icon?: string; kind: "board"; label?: string; meta?: string[]; name: string; subtitle?: string; title?: string; } | { end?: string; icon?: string; kind: "calendar"; label?: string; name: string; start: string; title?: string; } | { component: string; fields: string[]; icon?: string; kind: "custom"; label: string; name: string; props?: Record<string, JsonValue>; }

Defined in: packages/schema/src/model.ts:342

A way to show a list besides its table: a card per record, its content the built-in one or a component’s (card), a map of the records at their latitude and longitude, each opening the card of the cards display named cards (map), or a project component (custom) drawing the rows the list page loads. A card’s amount is the first of its fields with a value, footer its fields with a value joined by bullets, and flags boolean fields shown as small badges of their labels when true. name is what the address names (?display=cards); label and icon are its switch’s. See List displays.

{ amount?: string[]; badge?: string; card?: string; dots?: string[]; favorite?: CardFavoriteModel; flags?: string[]; footer?: string[]; icon?: string; image?: string; kind: "cards"; label?: string; meta?: string[]; name: string; photos?: CardPhotosModel; subtitle?: string; title?: string; }

optional amount?: string[]

Fields of which the first with a value shows in bold, such as a price or a rent.

optional badge?: string

A field drawn as a badge with its value labels.

optional card?: string

The component that draws each card’s content instead of the built-in card.

optional dots?: string[]

Related columns of the list (c.related) shown as lines of their dots at the card’s bottom, by their names.

optional favorite?: CardFavoriteModel

The button in the card’s top right corner that saves the record to the user’s own list, such as favorites.

optional flags?: string[]

Boolean fields shown as small badges of their labels when true.

optional footer?: string[]

Fields joined by bullets on a line at the card’s bottom.

optional icon?: string

The display’s icon in the switch.

optional image?: string

A file field shown as a picture across the card’s top.

kind: "cards"

A card per record.

optional label?: string

The display’s name in the switch.

optional meta?: string[]

A few small fields, such as dates, each shown when it has a value.

name: string

What the address names (?display=cards).

optional photos?: CardPhotosModel

Where the card’s further photos come from.

optional subtitle?: string

The line under the title.

optional title?: string

The card’s title; the view’s title when omitted.


{ approximate?: string; area?: string; cards?: string; defaultRadius?: number; exact?: string; icon?: string; kind: "map"; label?: string; latitude: string; longitude: string; name: string; radius?: string; }

optional approximate?: string

The boolean field that is true when the record’s position is approximate.

optional area?: string

The field holding the GeoJSON geometry around an approximate position: a polygon, or a line such as a street.

optional cards?: string

The cards display whose card a chosen marker shows; the list’s first cards display when omitted.

optional defaultRadius?: number

The radius, in metres, of the circle around an approximate position whose record states no area or radius.

optional exact?: string

The boolean field that is false when the record’s position is approximate.

optional icon?: string

The display’s icon in the switch.

kind: "map"

A map of the records at their position.

optional label?: string

The display’s name in the switch.

latitude: string

The filterable number field holding each record’s latitude, in decimal degrees.

longitude: string

The filterable number field holding each record’s longitude, in decimal degrees.

name: string

What the address names (?display=map).

optional radius?: string

The number field holding the radius, in metres, of the circle around an approximate position.


{ badge?: string; by: string; icon?: string; kind: "board"; label?: string; meta?: string[]; name: string; subtitle?: string; title?: string; }

optional badge?: string

A field drawn as a badge with its value labels.

by: string

The filterable enum field whose values are the columns, and which a card dragged to another column sets.

optional icon?: string

The display’s icon in the switch.

kind: "board"

A column per value of an enum field, a card per record in its value’s column, moved by dragging.

optional label?: string

The display’s name in the switch.

optional meta?: string[]

A few small fields, such as dates, each shown when it has a value.

name: string

What the address names (?display=board).

optional subtitle?: string

The line under the title.

optional title?: string

The card’s title; the view’s title when omitted.


{ end?: string; icon?: string; kind: "calendar"; label?: string; name: string; start: string; title?: string; }

optional end?: string

The filterable field of start’s type a record ends on; a record is on its start day alone when omitted.

optional icon?: string

The display’s icon in the switch.

kind: "calendar"

The records on the days they cover, in a month grid or a week grid, moved to another day by dragging.

optional label?: string

The display’s name in the switch.

name: string

What the address names (?display=calendar).

start: string

The filterable date or timestamp field a record starts on.

optional title?: string

The event’s text; the view’s title when omitted.


{ component: string; fields: string[]; icon?: string; kind: "custom"; label: string; name: string; props?: Record<string, JsonValue>; }

component: string

The component’s name, as protobase.ui.tsx registers it.

fields: string[]

The fields it shows, loaded with the names of the records relations point at.

optional icon?: string

The display’s icon in the switch.

kind: "custom"

The rows drawn by a project component.

label: string

The display’s name in the switch.

name: string

What the address names (?display=board).

optional props?: Record<string, JsonValue>

The plain data the component gets, with field references where it takes a field.