Hi Retool community!
As introduced in our build-along last week, Repeatables have been rebuilt from the ground up with our new List View and Grid View components! Learn more about how to use the new List View through docs here or watch the build-along session here.
Here are some exciting features about our new Repeatables:
Attaching a datasource
Most repeatables have underlying data that determine the number of instances as well as the content for your list or grid. You can now select a query or variable to power your repeatables, or use JavaScript.
The item variable
After setting up a datasource, you can use the keyword item
to access the relevant entry for your datasource from any children inside of a Repeatable.
Before: | After: |
---|---|
If youβre working with nested repeatables, you can access items from different scopes with references to listView1.item
or listView2.item
:
i
and ri
are also still available as variables representing the index.
Virtualization & Performance
Weβve made performance improvements by virtualizing the new List Views so they can support many items.
Scope limitations: for performance reasons, we currently do not support indexing into components inside of a Repeatable to access their properties. Instead, we recommend adding event handlers to track state changes back to data in your Repeatables.
Stay tuned for upcoming aggregation features for the new List View!
Feel free to post questions & feedback here on the forum! We look forward to seeing what you build.