The Custom Collection component for Retool Mobile
A repeatable set of components with values that map to a list of data.
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.
events
A list of configured event handlers that trigger actions or queries.
Type | array | ||||
Array values | object | ||||
Mutability |
|
Array Object Properties
event
The event that triggers the action. Refer to the events section for details of available events for this object.
Type | string | ||||
Mutability |
|
method
The JavaScript method to perform when type
is datasource
, widget
, state
, or localStorage
.
Type | string | ||||
Mutability |
|
type
The type of action to perform.
Type | string | ||||||||||||||
Mutability |
| ||||||||||||||
Allowed Values |
|
hidden
Whether this object is hidden from view.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
true
pagination
The pagination state.
Type | object | ||||
Mutability |
|
Object Properties
afterCursor
The cursor to reference in a request for the next set of data.
Type | string |
Format | Plain Text |
Mutability | Read-only |
Examples
"eyJ0eXBlIjoiZm9vIiwic3RhdHVzIjoiYmFyIn0="
beforeCursor
The cursor to reference in a request for the previous set of data.
Type | string |
Mutability | Read-only |
Examples
"page1"
serverPaginated
Whether the data is paginated on the server.
Type | boolean |
Format | True/False |
Mutability | Read-only |
Examples
true
serverPaginationType
The type of server-side pagination in use.
Type | string | ||||||
Mutability |
| ||||||
Allowed Values |
|
primaryKey
The primary key with which to identify records.
Type | string | ||||
Mutability |
|
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
customCollection.setHidden()
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
customCollection.setHidden(hidden)
Parameters
Examples
true
Examples
Hide customCollection
.
customCollection.setHidden(true);
Unhide customCollection
.
customCollection.setHidden(false);
customCollection.setSelectedPageIndex()
Set the selected page index.
customCollection.setSelectedPageIndex(index)
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 |
---|---|
Press | An item is pressed. |