SortMenu
A menu that lets the person choose the order of a RecordList on the same screen.
Use it for: Letting people sort by name, newest or due date. Each option names one of the orders the list operation lists in sortOptions. The first option is the order until another is chosen.
- CategoryInput
- ChildrenNone
- DataNone
- ActionNone
| Prop | Required | Accepts | What it does |
|---|---|---|---|
label |
No | text, up to 200 characters | The menu’s label. Default Sort. |
options |
Yes | list of 2 to 6 items | The orders to offer, each with a label and a sort naming one of the operation’s sortOptions. |
Every component also accepts id (required, unique on its screen), and the optional preset and style described in Style options. Every component except Screen accepts when, described in Data-driven look.
Example
Section titled “Example”From the Northline Builders example project:
{ "id": "project-sort", "type": "SortMenu", "props": { "label": "Sort", "options": [ { "label": "Name", "sort": "name" }, { "label": "Newest", "sort": "newest" }, { "label": "Due date", "sort": "due" } ] }}