The List Collection mobile layout
A content area to display items in a grid or list.
Properties
All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.
cardSize
The size of cards to display if cardType
is media
.
Type | string | ||||||
Mutability |
| ||||||
Allowed Values |
|
cardStyle
The card style to use.
Type | string | ||||||
Mutability |
| ||||||
Allowed Values |
|
cardType
The type of cards to display.
Type | string | ||||||
Mutability |
| ||||||
Allowed Values |
|
data
The data.
Type | string | number | boolean | object | array | ||||||
Format | Custom data | ||||||
Mutability |
|
hidden
Whether this object is hidden from view.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
itemMode
The configuration mode for options.
Type | string | |||||||||
Mutability |
| |||||||||
Allowed Values |
| |||||||||
Default |
|
Examples
prefixIconByIndex
A list of icons for each item, by index.
Type | array |
Array values | string |
Mutability | Read-only |
Default |
|
Examples
prefixIconColorByIndex
A list of icon colors, by index.
Type | array |
Array values | string |
Mutability | Read-only |
Examples
prefixImageFitByIndex
A list of image fit x-settings, by index.
Type | array |
Array values | string |
Mutability | Read-only |
prefixImageShapeByIndex
A list of image shape x-settings, by index.
Type | array |
Array values | string |
Mutability | Read-only |
prefixImageSizeByIndex
A list of image aspect rations, by index.
Type | array |
Array values | string |
Mutability | Read-only |
prefixImageSourceByIndex
A list of image sources, by index.
Type | array |
Array values | string |
Mutability | Read-only |
prefixTypeByIndex
A list of prefix types, by index.
Type | array |
Array values | string |
Mutability | Read-only |
scrollDirection
The direction for which items scroll.
Type | string | ||||||
Mutability |
| ||||||
Allowed Values |
|
Examples
selectedItem
The selected item.
Type | string | number | boolean | object | array |
Format | Custom data |
Mutability | Read-only |
Default |
|
Examples
serverPaginated
Whether to use server-side pagination.
Type | boolean | ||||
Mutability |
|
subtitleByIndex
A list of item body text, by index.
Type | array |
Array values | string |
Mutability | Read-only |
subtitleLengthByIndex
A list of maximum lines to display values, by index.
Type | array |
Array values | number |
Mutability | Read-only |
suffixIconByIndex
A list of icons for each item, by index.
Type | array |
Array values | string |
Mutability | Read-only |
Default |
|
Examples
suffixTypeByIndex
A list of action types, by index.
Type | array |
Array values | string |
Mutability | Read-only |
suffixValueByIndex
A list of boolean values, by index.
Type | array |
Array values | boolean |
Mutability | Read-only |
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
listCollection.setHidden()
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
listCollection.setHidden(hidden)
Parameters
Examples
listCollection.setSelectedPageIndex()
Set the selected page index.
listCollection.setSelectedPageIndex(index)
Parameters
Events
Events triggered by user interactions. You can configure event handlers in the IDE to trigger queries or other actions in response to events.
Event | Description |
---|---|
Button Press | A button is pressed. |
Checkbox Press | A checkbox is pressed. |
Press | An item is pressed. |
Switch Press | A switch is toggled. |