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
| Option | Description | Default |
|---|---|---|
| type | Column type (see Column Types) | text |
| label | Column heading text (default: column name) | column key |
| invisible | Determine if the column is invisible (it can be changed by user) | false |
| searchable | Determine if the column value should be included in search results | false |
| sortable | Determine if the column can be used for sorting records | false |
Column Types
Text
- Type:
text
Datetime
- Type:
datetime
Datetime column options
| Option | Description | Default |
|---|---|---|
| format | Date time format | Y-m-d H:i (e.g. 2022-01-30 18:45) |
Note: Check PHP DateTime for the full list of recognized characters as format option.
Boolean
- Type:
boolean