The List View component for Retool Apps
A list that renders each item from an array of data using a custom-built row of components.
This is a legacy component that is no longer supported. Use the newer version of this component which has more features and functionality.
List View supports unique row keys and displays rows using dynamic or fixed height. Rows can contain any combination of components to customize how data is interacted with or presented.
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.
data
The data.
Type | string | number | boolean | object | array | ||||||
Format | Custom data | ||||||
Mutability |
|
direction
The layout of content.
Type | string | ||||||
Mutability |
| ||||||
Allowed Values |
|
dynamicHeightsEnabled
Whether list item height is dynamically set.
Type | boolean | ||||
Mutability |
|
formDataKey
The key used by a Form component to assign default values to input fields using form.initialData
, and to construct the form.data
property.
Type | string | ||||
Format | Plain Text | ||||
Mutability |
| ||||
Default |
|
Examples
table1.selectedRow.id
heightType
Whether the height automatically adjusts to fit content or is a fixed size.
Type | string | ||||||
Format | Plain Text | ||||||
Mutability |
| ||||||
Allowed Values |
| ||||||
Default |
|
hidden
Whether this object is hidden from view.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
true
id
The unique identifier (name).
Type | string | ||||
Format | Plain Text | ||||
Mutability |
| ||||
Default |
|
Examples
query1
button1
isHiddenOnDesktop
Whether to show or hide this object in the desktop layout.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
isHiddenOnMobile
Whether to show or hide this object in the mobile layout.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
layoutType
The layout type.
Type | string | ||||||
Mutability |
| ||||||
Allowed Values |
|
maintainSpaceWhenHidden
Whether to take up space on the canvas if hidden
is true
.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
margin
The amount of margin to render outside.
Type | string | |||||||||
Format | Plain Text | |||||||||
Mutability |
| |||||||||
Allowed Values |
| |||||||||
Default |
|
Examples
4px 8px
overflowType
The overflow behavior when the contents exceed the height.
Type | string | ||||||
Mutability |
| ||||||
Allowed Values |
|
padding
The amount of padding to render inside.
Type | string | ||||||
Format | Plain Text | ||||||
Mutability |
| ||||||
Allowed Values |
| ||||||
Default |
|
Examples
4px 8px
showBorder
Whether to show a border.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
showInEditor
Whether the component remains visible in the editor if hidden
is true
.
Type | boolean | ||||
Format | True/False | ||||
Mutability |
| ||||
Default |
|
Examples
true
style
Custom style options.
Type | object | ||||
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.
legacyListView.scrollIntoView()
Scrolls the canvas or parent container so that the selected component appears in the visible area.
legacyListView.scrollIntoView(options)
Parameters
Object Properties
behavior
The scroll behavior.
Type | string | ||||||
Allowed Values |
|
block
The scroll position relative to the component.
Type | string | ||||||||||
Allowed Values |
|
Examples
Scroll the minimum amount to immediately bring legacyListView
into view.
legacyListView.scrollIntoView({behavior: 'auto', block: 'nearest'});
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 |
---|