list-item
Last updated
Last updated
list
contains one or many list-item
elements.
A list-item
can be defined as either static (for basic usage) or dynamically (will repeat itself for each item in a query). A simple static list will be defined as:
While a dynamic list will be defined as:
You can also mix dynamic and static list items together such as:
list-item
syntaxlist-item
attributes can be represented as either shorthand (perfect for quick and common use cases) or longhand (for more complicated use cases). In shorthand mode, you can simply add attributes such as content="test"
on a list-item
while in longhand mode you would nest a <content>test</content>
tag inside the list-item.
The following attributes on a list-item
support the shorthand notation:
bind
Optional
Default: unset
Shorthand supported? false
The presence of bind
makes the list selectable. bind
contains the variable that stores the object that the user selected. Must be the same data model type as the list-item
's query
.
Note: A list-item
's action
's on-press
has no effect if the bind
attribute is set.
content
Optional
Default: unset
Shorthand supported? true
Text that is displayed in the content position of the list-item
.
footer
Optional
Default: unset
Shorthand supported? true
Text that is displayed in the footer position of the list-item
.
header
Optional
Default: unset
Shorthand supported? true
Text that is displayed in the header position of the list-item
.
query
Optional
Default: unset
Shorthand supported? false
The presence of query
makes list-item
s dynamic. query
contains the name of the query or array variable to populate the objects shown as list-item
s.
icon
image
on-press
on-press-icon
show-if
and hide-if
Type: Same type as
Type: string
(static text, a or the return value of a )
Type: string
(static text, a or the return value of a )
Type: string
(static text, a or the return value of a )
A shorthand attribute. See
A shorthand attribute. See
A shorthand attribute. See
A shorthand attribute. See