Lists

Display a list of records in auto-paginated, sortable and filterable table.

View list.yaml example
# /flatpack/posts/list.yaml

columns:
  id:
    label: ID
    sortable: true
    searchable: true

  title:
    label: Post Title
    sortable: true
    searchable: true

  created_at:
    label: Created
    type: datetime
    format: "Y-m-d H:i:s"
    sortable: true

  updated_at:
    label: Updated
    type: datetime
    format: "Y-m-d H:i:s"
    sortable: true

Column Options

OptionDescriptionDefault
typeColumn type (see Column Types)text
labelColumn heading text (default: column name)column key
invisibleDetermine if the column is invisible (it can be changed by user)false
searchableDetermine if the column value should be included in search resultsfalse
sortableDetermine if the column can be used for sorting recordsfalse

Column Types

Text

  • Type: text

Datetime

  • Type: datetime

Datetime column options

OptionDescriptionDefault
formatDate time formatY-m-d H:i (e.g. 2022-01-30 18:45)

Note: Check PHP DateTimeopen in new window for the full list of recognized characters as format option.

Boolean

  • Type: boolean