Are cloned columns linked?

I need to clone columns in my app, and the cloning happens successfully. The column I am cloning contains 3 text inputs, a label, and a switch. But, I am unable to edit the text of any of the inputs in the cloned columns. For example, if I try to edit the second input in a cloned column, it will set the text of the 2nd input in the original column.
This is my cloning code:
image

Why is this happening?

This is timelyā€¦ Iā€™m deep in cloning and referencing clones. It proves to be confusing even when I think I understand it.

Can you post a screenshot of the component tree (list)?

1 Like

Sureā€¦
This is what my column looks like:
image
image

Iā€™ve managed to find a workaround, but itā€™s not really good.


But the problem is that there are no styling options for this. What comes out is a column I canā€™t see and a couple of inputs squashed together. Looks terribly ugly.

1 Like

If your clone block is inside of a loop, make sure to add a Wait 0 Seconds block inside the loop.

See this:

2 Likes

Itā€™s not inside a loop, but after one.

My full code:


and so onā€¦

1 Like

I donā€™t know why your blocks arenā€™t working. :confused:

I tried a simple example based on your first screenshot and neither method I employed is working:

https://x.thunkable.com/copy/ff3a4f3ebab26adfa941eb98fecb8523

And this crashes Thunkable or returns ā€œundefinedā€ which tells me that the list must be empty after cloningā€¦

2 Likes

But this does work:

Which tells me that even though the cloning finished in your example and in my first example, the list of components didnā€™t update quickly enough for our other blocks to work.

So hereā€™s a looping version:

https://x.thunkable.com/copy/37aa4145dfe4243a3f5a547ab3ab0cc7

4 Likes

@jane See my post just above this one. Any ideas why the list of components isnā€™t updating (my assumption) by the time the clone blockā€™s ā€œdoā€ section runs?

1 Like

Thank you so much for this! Will definitely try it out in the morning. The response I am getting to my code is:

For example, I set the text of the first input in the first column to ā€˜aā€™. Then, I click the button and a new column gets created. When I try to change the text of the first input in this column to ā€˜bā€™, the text of the input in the first column gets updated to ab.

Why is this happening? The columns are getting created successfully so I donā€™t think that itā€™s a problem with the code.

1 Like

Share a link or screenshot of your blocks.

2 Likes

https://x.thunkable.com/copy/5f5361475a58875b07befe4a6be26200

1 Like

That is really, really strange.

I simplified your project and itā€™s still doing it. If I type in a Book Name and then click Add Book, the next characters I type in a different text input field only show up in the original Book Name text input and only a single character at a time.

https://x.thunkable.com/copy/2f92186c75b72266e359e6c007fbb8ed

2 Likes

I did a search and there are many topics about this particular bug.

See this, for example:

2 Likes

This is weird. @domhnallohanlon Did you ever figure out what the issue was with @funhall?

1 Like

Yeah, thatā€™s exactly the behaviour I was talking about.

1 Like

I found a temporary solution:
I made a custom DVL with all my inputs, and whenever the ā€˜Addā€™ button was clicked, I created a new row in my Data Source with blank text values. That created a new column but with blank text inputs. When any of my inputsā€™ value was changed, I set the value of that particular cell for the RowID to the inputā€™s text.

Oops! This doesnā€™t work. I want to update the value of the linked cell whenever Text_Input Tasks changes, but this code isnā€™t working:


Any ideas?

**Edit: Even weirder- when I click the add button, the text inputs I have filled in before get wiped clean. When I try to edit the first text input in the second DVL column, the first text input in the first DVL column changes to exactly what Iā€™m typing.


Same with the other inputs. I have absolutely no idea what to do.
**

I think thatā€™s still the same bug. Cloned text inputs donā€™t get updated correctly when you type in them.

1 Like

These inputs are in a DVL. Does that bug apply to them too?

I donā€™t know, sorry!

1 Like