@danieluthup2 Arthur Valatin’s method doesn’t talk about load more button, it is more like auto loads when the box appears on the screen. At least that is my understanding…
@kesavan Ohh!
my bad!!
Sorry…
I got it wrong
@danieluthup2 No problems at all, in the event if I can’t make it work that way I guess I will have to use your solution…
@kesavan I think you need to move your box a bit upwards if your box is at the bottom of your page.
@arthurvalatin I did, it is right below my repeater right now, not at the bottom of the page anymore.
https://support.wix.com/en/article/corvid-improving-performance-in-wix-sites-with-data
This page has solution to all your problems.
Main Suggested code from article for your problem -
$w.onReady(function () {
$w('#myDS').onReady(async () => {
while($w('#myDS').getCurrentPageIndex() < $w('#myDS').getTotalPageCount()) {
await $w('#myDS').loadMore();
}
});
});
@kesavan The problem is because you have the box under your repeater. It needs to be ABOVE YOUR REPEATER . This should probably work.
Hi Kesavan ,
Check this video of Code Queen →
https://www.youtube.com/watch?v=qP2Xfr_4A4I&feature=youtu.be
https://www.wix.com/corvid/forum/community-discussion/scroll-to-last-item-in-repeater
export function loaderStrip_viewportEnter(event) {
let hasNext = $w('#dataset1').hasNext();
if (hasNext === true) {
$w('#dataset1').loadMore()
.then(() => {
console.log("Finished");
});
}
else {
console.log("No more data");
}
}