I’m trying to link a repeater item to a lightbox that’s connected to a dataset, I managed to get the lightbox to open, however I encountered 2 issues:
-
Lightbox’s content doesn’t change to what’s in the dataset.
-
For the OnClick event I chose an image inside the repeater, but when hovering it the cursor doesn’t change so it looks like it clickable (it is clickable and opens the lightbox though)
This is the code I used for the page with the repeater:
import wixWindow from 'wix-window';
$w.onReady(() => {
$w("#uxuiRepeater").onItemReady(($w, itemData, index) => {
$w("#thumbimage").onClick(() => {
const repeaterItem = itemData;
wixWindow.openLightbox("Projects", repeaterItem);
});
});
});
And this is the code I used for the lightbox page:
import wixWindow from 'wix-window';
$w.onReady(function () {
let receivedData = wixWindow.lightbox.getContext();
$w("#image").items = receivedData.image;
});
Below is an image of the dataset fields.
Can anyone please guide me with what I’m doing wrong? How can I get the lightbox to show data from the dataset? and why does the cursor not change when hovering on the OnClick element?
Thanks a lot!!