<textList>
The <textList>
is a Text
component that stores multiple <text>
components within a list.
Attributes and Properties
Attribute | Type | Values |
---|---|---|
asList = "…" | "true" "false" | |
maxNumber = "…" | number | |
unordered = "…" | boolean | "true" "false" |
Property | Type |
---|---|
$t.maxNumber | number |
$t.numComponents | number |
$t.numValues | number |
$t.unordered | boolean |
Example: <textList>
with direct input
In the sample code above, the individual <text>
components are listed directly between the opening and closing <textInput>
tags, with spaces to separate list items.
Example: <textList>
from user-input
The user is prompted to provide three text responses
with the <textInput/>
component, which are then referenced within the
definition of a <textList>
. Individual entries in the list can be referenced by index.
Attribute Example: unordered
The unordered
attribute allows for boolean comparisons between lists,
such as in the <award>
component or the <boolean>
component,
without regard to the order in which the names of the fruits have been entered.
Attribute Example: maxNumber
In the sample code above, the maximum number of <text>
components displayed is 3, even
though there are 5 <text>
components listed directly between the opening and closing <textInput>
tags.