In a column block, I have a row with a label and a button.
I would like to clone this row to have 5 row in my column where each label have an incremental text.
To do so I do this:
But it doesn’t sound good to me 'cause there’s no referencing to the cloned row’s label.
Indded, I obtain this.
As you can see, I don’t have 1,2,3,4 and 5 but 5,1,2,3 and 4.
I’m looking for something like “in cloned row” set etichetta’s text to XXXXXX" But I can’t find it.
Can somone help me?
Thank you
I’m getting the first (probably only) label in the new cloned row, and setting it’s text. You’ll find the blocks you need the the same drawer as the clone block.
I’m looping through Firebase nodes but you could just replace the “for each j in list” with a counting loop instead.
The key – as I see @catsarisky just posted above – is to use the “all label in” block in the Any Components drawer and then to specify the # (order) of the label within the row. Is it the first label, the second label, etc.? The loop count variable I’m using just cycles through all rows in the column.
I didn’t show you the bottom of my loop block but I always add a “wait 0 seconds” block within the loop. I’m not sure why it makes a difference but it does.
Thank you both @tatiang and @catsarisky a wait block is what I needed. And 0 seconds solve the problem…Could it be a Live testing or preview problem or it happen even in app?
I’m opening an issue for that in github.
At the moment I have a column with 1 element and every time I press a button I have to clone that element several times.
The problem it that an the next time i press th button, I have to delete previous clones and create the new ones, so the column and the original one, should stay there