I'm making a dashboard to manage some Postgres tables. The main table has a one-to-many relationship with a child table. I have a ListView component displaying a Form for each item in the child table.
My issue is that the forms are only displaying data from the initial time they are rendered, not dynamically updating when the child query is executed. The number of forms changes appropriately, just not the contents. What is strange is that when hovering over the query for Data source
for the form, it shows what the expected, correct data would be. Its just the displayed state is stale.
In the ListView, Number of items
is {{ formatDataAsArray(childQuery.data).length }}
and Item keys
is {{ childQuery.data.id }}
. The form Data source
is {{ formatDataAsArray(childQuery.data)[i] }}
. Inspecting the application state, I can see the instances of the form are still reflecting their initial state, not updating as the childQuery
results change.
Screenshot of the initial state, showing the ListView configuration:
After selecting a different item in left column, middle shows updated data for parentQuery
and the childQuery
updates appropriately. Just the Form within the ListView is still showing data from the original state.
If it helps, I'm running Retool on prem version 3.4.3.
Edit:
I reworked the ListView to instead have text + a button for each entry, that when clicked populates a modal. The text component gets the correct data just fine. Definitely a bug with the Form source data not being reactive/not re-rendering correctly.