Hi everyone
We heard your feedback about accessing input values inside the new list views, and we’re excited to let you know that list view aggregation is finally widely available on Retool Cloud. List view aggregation eagerly aggregates and exposes input values inside your list view, while maintaining virtualization to the best extent possible.
How to turn it on
Once the flag is toggled for your organization, select a list view and toggle “Enable instance values” in the “Interaction” section to turn on aggregation for your list view.
How to access instance values
Add any plugin that has a formDataKey
in its properties (i.e., all inputs and list view) to your list view.
The values for those inputs will now be accessible on the list view’s state under the property instanceValues
.
instanceValues
is an array of objects for every instance (virtualized or not) of your list view, where the object is a mapping of an input’s formDataKey
to its value. For your convenience, we’ve also included the primaryKey
for each instance within that object (the primaryKey
is defined in the list view inspector).
How else you can modify inputs
We’ve also added two convenience APIs to the list view:
resetInstanceValues
will reset your input values to their defaultsclearInstanceValues
will clear your input values
Coming soon
We’re currently testing list view support in forms, so instanceValues shows up in your form data and form APIs also manage list view inputs.
Please comment here if you run into any issues or have any further questions or feedback. Happy building!