I have a table with records. On action it opens modal with ListView (New) that based on query using data from table record.
I need to be able change some data in ListView via dropdowns and save it. In case of closing modal I want to reset these dropdowns (otherwise chosen value will be displayed in next opening of modal)
I'm trying to reset it with Run code (action event) but nothing happens - Retool doesn't see this dropdown. I tried to changed name and saw that Retool changed select name in code too (so it recognises it).
I am also having the same issue. It seems to be that without being able to index the component in the listview, it's we can't reset the component if there are multiple iterations of it. I can always reset the first one, but all the other iterations of the component keep the data I last had if I previously had interacted with the component. If I did not interact with the component (ie., read only), there's no issue because the underlying data has changed.
Something like this will happen. wasteDetails.rows is the underlying dataset, wasteDetails.value.row.name should be "UN1993..." but instead it shows "NEW VALUE" which is the last value entered to the editable text component for a different record. If I'm able to do a resetValue on all the components, it would seem to work just fine because the component won't retain memory of the previous interaction.
Thanks for flagging this! It is likely a bug on our end with our ListView component. We're actively looking into it and working to implement a fix!
While our ENG team continues to look into this, do you mind ensuring that you've set a primary key on your List Views (whether it be in the described use cases here or any new ones moving forward)?
To further describe the intended behavior of this component - Retool won't know that the data changed unless there's a primary key set. You should also store your changed values in an external state so returning to the page restores the intended values.
Let us know if the above helps!