Sorting ForEach/StackLayout node


#1

I’m rendering a dynamic list using a Stack layout -> For Each structure, but I notice that by default newly added items always stack at the bottom.

Is there a way to allow for new items to be added on top instead and have a reverse chronological view?


#2

The For Each node will add the items in the same order as they exist in the Collection. You can use the myCollection.addAtIndex(item, index) function in Javascript, with index set to 0 to add an item first in the collection.

If you’re adding items without Javascript I noticed that we lack an Item Index input, so it’s only possible in Javascript right now.