How do you control the order that items appear in a repeater?
I dragged a repeater into the editor – it is one of those having 3 items stacked atop each other, each filling the whole width of the screen. I then deleted 2 of the 3 repeater items, customized the remaining one, and connected its elements to my database. At first, it worked exactly as desired.
Then I added another row to the database and the new item appears as the first item in the repeater. I want it to be the 5th item.
Thanks,
-Tony
@ourotheraccount It’s possible to set the sort order of the dataset. Click on the dataset and choose “Settings” and scroll down a bit.
Thank you! This worked fine.
Maybe it will help other newcomers like me if I explain at little.
First, clicking on the dataset icon within the Wix editor should immediately bring up the “Settings” button you mentioned, but I find that it often does not. It seems to depend on what was clicked previously and also the rate at which you pass your mouse over it. Eventually I was able to make it work by clicking on various items and then very slowly hovering near the edge of the data set icon.
Second, using the ‘sort order’ mentioned by @anthonyb means that you must select a field in your dataset that will order the records as needed. In my case this meant first adding an ‘order’ field to my dataset (and filling it with the right sequence of numbers) so that I could select that field within the “Settings”
I neglected to mention that if you are truly sorting by the order added to the collection, you could choose the built-in Created Date field.