Hi folks !
I’ve created a loading screen that is displayed as the user sets a filter, the loading screen was made with a GIF on a strip, since I haven’t found a way to close a lightbox after the loading was done.
So my question is, is there a way to disable scrolling so the user sees the strip on his entire screen and is unable to see the bottom of the strip? Or make the strip vertically responsive ?
Or what would be awesome would be to close a lightbox once the loading has been done (apparently, since lightboxes are considered a different page, there is communication between the current page and the lightbox)
Or if you have any better idea… 
Thanks !
You can close a lightbox using the code below.
wixWindow.lightbox.close(dataObj);
Don’t forget to import the wixWindow stuff 
Thanks, but I already tried, I want it to close when all items on the page have done loading :
current code for one filter :
//searches after typing in the search text input
export function shape18_click(event, $w) {
let filter = wixData.filter();
//shows loading screen while loading data
$w('#loader').show();
if ($w("#checkbox1").checked)
{
filter=filter.ne("dispo", true);
}
filter = filter
.contains("title", $w("#searchInput").value)
.contains("categorie", $w("#categorieInput").value)
.contains("vendeur", $w("#vendeurInput").value)
.contains("type", $w("#typeRadio").value);
$w("#dynamicDataset").setFilter(filter)
//hides loading screen after data was retrieved
.then( () => {
$w('#loader').hide();
});
}
and what’s Dataobj ?
Hey
You might want to consider putting the datasets onready around it, like below.
$w("# dynamicDataset “).onReady( () => {
$w(” #dynamicDataset ").setFilter(filter)
.then( () => {
$w(’ #loader ').hide();
});
} );
The code was the one on the page not on the lightbox, and it works.
I don’t get it, where should I put this according to you ?
wixWindow.lightbox.close(dataObj);
Hi,
lightbox.close method works from the lightbox it self
Roi.
In tried this (on the page)
//selects the 'categorie' input
export function categorieInput_change(event, $w) {
let filter = wixData.filter();
//shows loading screen while loading data
wixWindow.openLightbox("Loader");
if ($w("#checkbox1").checked)
{
filter=filter.ne("dispo", true);
}
filter = filter
.contains("title", $w("#searchInput").value)
.contains("categorie", $w("#categorieInput").value)
.contains("vendeur", $w("#vendeurInput").value)
.contains("type", $w("#typeRadio").value);
$w("#dynamicDataset").onReady( () => {
$w("#dynamicDataset").setFilter(filter)
//hides loading screen after data was retrieved
.then( () => {
wixWindow.lightbox.close("Loader");
});
}
);
}
even this (on the lightbox code panel)
$w("#dynamicDataset").onReady( () => {
.then( () => {
wixWindow.lightbox.close("Loader");
} );
}
but no dice
On second thought, I’ve chosen to put the GIF in the filter box, not on the entire screen, so I don’t need any help anymore !
Thanks anyway Roi ! 
Hi,
Sorry I would use this code, but I never did before something similar.
Where do I have to add it?
Could you explain me please?
I would add in order not to have vertical scroll in the site.
Thanks