I’ve got title dynamic page which refers images from another dataset (I use wixData.filter())
Problem is when my page loads it shows the first image from the dataset I’ve placed images and then it starts to filter the proper ones.
I try to hide gallery and…
$w.onReady( function () {
$w(“#gallery1”).show
}
but it doesn’t work.
$w.onReady( function () {
let render = $w(“#Page1”).rendered
if (render===1){
$w(“#gallery1”).show
}
…Also…
Can You help?
Hello,
The problem is with .show , instead it should be .show(),
let me know if this solves it.
More about .show() - Box - Velo API Reference - Wix.com
Best,
Majd
Nope. I’ve tried this before too…
Can you send me your sites URL so I can check from the inside?
Thanks
Sure:
https://www.welltravel.pl/Bali3/Wina-Kuta-Holiday
I think it is because…
$w.onReady( function () {
$w(" #gallery1 ").show() // … site shows gallery which takes first photo from gallery and then gallery filter proper photos
}
I’ve tried to place .show() after filter code:
import wixData from ‘wix-data’;
$w.onReady(() => {
$w(‘#dynamicDataset’).onReady(() => {
var refer = $w(“#dynamicDataset”).getCurrentItem().title;
$w(‘#dataset2’).setFilter(
wixData.filter()
.eq(‘title’, refer));
});
$w(“#gallery1”).show()
});
… and the problem still exists.
Now I used “loading” gif. But this is solution I do not prefer. 
Hello,
Try:
import wixData from 'wix-data';
$w.onReady(() => {
$w('#dynamicDataset').onReady(() => {
var refer = $w("#dynamicDataset").getCurrentItem().title;
$w('#dataset2').setFilter(
wixData.filter().eq('title', refer));
}).then(() => {
$w("#gallery1").show()
})
});
I added a .then() after the filter to show the gallery after the filtering is finished.
Let me know how it goes
Majd