Hi everyone,
Im running this code on repeater. On moreInfo button click, lightbox pops up. The code is totally fine.
export function moreInfo_click(event, $w) {
$w('#moreInfo').hide();
$w('#loadingGIF').show();
setTimeout(() => {
$w('#repeaterPersonal').onItemReady(($item, data) => {
$w('#loadingGIF').hide();
$w('#moreInfo').show();
$item('#moreInfo').onClick(async() => {
wixWindow.openLightbox('profileLightbox', data._id);
})
})
}, 3000);
}
Now the problem is that it requires to click MoreInfo button always 2 times so Lightbox can be opened. But 2 times is only for the each items on the very first time you click. So if i hoover and click on the item from repeater 3rd,4th etc. time, then it will open from first click.
If i remove async function, then this lag dissapears and all is smooth. But then i loose data from repeater item into lightbox.
Any ideas? THank you!
@Ahmad @Yisrael (Wix)