Hi all,
I have a repeater connected to a dataset. I have code modifying how the elements of the repeater are displayed. The first page of the repeater displays as desired. When you click to page 2 (or 3, or so on), the repeater populates its elements but the code doesn’t visibly execute. If you click away from that page and return to it, the code has executed and everything is displayed as it should be. I’m guessing that the code is executing at the wrong time (I’m still really new to asynchronous code,) but I’ve included every onReady checks I could think of. Any ideas?
var myDataset;
$w.onReady(() => {
$w('#dynamicDataset').onReady(() => {
...
Large();
});
$w("#pagination1").onChange((event) => {
$w.onReady(() => {
$w('#dynamicDataset').onReady(() => {
Large();
});
});
});
});
function Large() {
$w('#sessions').onReady(() => {
$w('#repeater1').forEachItem(($item, itemData, index) => {
$item("#date").text = itemData.sessionDate.toLocaleDateString();
$item("#session").text = "Session: " + itemData.session + " of " + itemData.currentPackage;
... });
}