Understood.
That means the issue has become clear. However, since there’s no guarantee that simply waiting 1500ms will always work, it would be unstable and not a proper solution in its current form.
I believe the root cause of the current issue is that the dataset is connected to the gallery. So, if you really want to use a dataset for the implementation, it might be a good idea to disconnect the two and let them operate independently.
The problem is that because they are connected, the non-randomized data gets loaded at least once.
In situations like this, using a dataset tends to make things a bit more complicated. I think it would be much simpler and easier to understand if we just used the wix-data API directly to fetch the data, randomize it, and then feed it to the gallery.
It might be helpful to refer to previous examples like the following. ![]()