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