Hey,
I’m currently trialing an inifite-scroll which works:
export function box1_viewportEnter(event) {
$w.onReady( () => {
$w(“#dynamicDataset”).onReady( () => {
$w(“#dynamicDataset”).loadMore()
.then( () => {
$w(“#listRepeater”).forEachItem( ($w, itemData) => {
const item = $w(“#dynamicDataset”).getCurrentItem();
if (item.img1)
$w(“#gallery1”).expand();
if (item.img2)
$w(“#gallery2”).expand();
if (item.img3)
$w(“#gallery3”).expand();
if (item.img4)
$w(“#gallery4”).expand();
if (item.img5)
$w(“#gallery5”).expand();
///})
// console.log(“Done loading more data”);
});
});
});
});
}
The issue is as I keep scrolling downward it seems to be slowing down because every time it checks all current items displayed
Is there a way for it to only check the “newly loaded items” (i.e. PageSize = 7) instead of all items displayed??