Updating the value of an text input box which is part of a listview

Hi
I am trying to set the value of an text input which is part of a listview
for example txReply[2].setValue("TEST"); but it does not work
Could not find information about it

i managed to get the values of the text intput using instancevalues, but it is only readonly

Thanks

Try specifying the textInput component name directly.

textInput1.setValue('test')

Screenshot 2025-02-23 at 12.37.42 PM

Thanks
But this updates only the first textinput
i need to update the textinput of {{ i }}

Hi, you can use a temporary state as a mutable data source for a ListView. The key idea is to initialize the ListView's values through the temporary state. This allows you to easily modify the ListView data by simply updating the temporary state.

For a detailed, step-by-step guide on making ListViews editable, refer to this blog article.

Regards
Abdul Wasae
Toolshed - Hire Retool Developers

1 Like

Hey @idan_cohen,

Nested components cannot be referenced outside of a given repeatable (doc here)

However, you can reference it directly from the handle event of your button. So basically textInput1.setValue('test') from a repeatable's component, rather than from a js query (which can't access the repeatable's components)

1 Like