Skip to content

RecordList

Loads rows with a list operation and draws its one child once per row.

Use it for: Any list of records from your database, with paging built in.

  • CategoryData
  • ChildrenExactly one (the row template)
  • DataA list operation (bindings.items)
  • ActionNone
Prop Required Accepts What it does
pageSize Yes whole number, 1 to 100 How many rows to load at a time.
emptyText Yes text, up to 200 characters Shown when there are no rows.

Every component also accepts id (required, unique on its screen), and the optional preset and style described in Style options.

From the fitness example project:

{
"id": "workouts",
"type": "RecordList",
"props": {
"pageSize": 25,
"emptyText": "No workouts yet"
},
"bindings": {
"items": {
"operationId": "list-workouts",
"parameters": {},
"pagination": {
"offset": 0,
"limit": 25
}
}
},
"children": [
{
"id": "item",
"type": "Stack",
"props": {},
"children": [
{
"id": "name",
"type": "Text",
"props": {},
"bindings": {
"value": {
"model": "workout",
"field": "name"
}
}
},
{
"id": "category",
"type": "Badge",
"props": {},
"bindings": {
"value": {
"model": "workout",
"field": "category"
}
}
},
{
"id": "duration",
"type": "Text",
"props": {},
"bindings": {
"value": {
"model": "workout",
"field": "duration"
}
}
},
{
"id": "remove",
"type": "Button",
"props": {
"label": "Delete workout"
},
"action": {
"type": "operation",
"operationId": "delete-workout",
"parameters": {
"id": {
"source": "field",
"model": "workout",
"field": "id"
}
}
}
},
{
"id": "edit-selected",
"type": "Button",
"props": {
"label": "Edit workout"
},
"action": {
"type": "navigate",
"routeId": "edit-workout",
"parameters": {
"id": {
"source": "field",
"model": "workout",
"field": "id"
}
}
}
}
]
}
]
}