I am trying to have add a component where the user can edit a list. Right now I have the list populate from a SQL query and then have two buttons to either pick from a dropdown (and add a new line) or add a new line and manually enter. Once clicked, I have JS query running to change the value, but cant quite get it to work. I need the latest added indexed item (realEstate3 or -1) value to change.
Oddly enough, when I do categories_realEstate_input.setValue("test") it works, but when I try and pass a variable into the index, it doesn't work.
Note. The TextInput is inside of a listview component, such that each integer of realEstate3 will add a new TextInput component.
Hello you can try the following
Hmm... That worked!
I had to separate the instance modification (+1) and the setValue, since there seemed to be a delay in adding the new instance before setting the value--which ended up causing the second-to-last instance getting the value.
It looks like that only partially worked. I keep getting a repeating problem where it is taking the second-to-last entry. I added a wait function with a 10 second delay and it still has this issue oddly enough.
Hello, you can do this instead
and a debounce of 100ms
Edit: actually debounce is not necessary
I'm not sure why, but when I tried using the control component before, the index option did not show up.