⚠️ Load More on repeating group. How?

How do I set number of Data Entries to display initially?
And the how do I add Load More button at the end of RG?

2 Likes

Pagination would be my approach on this. I’d probably use list shifter or another method to complete this paginating

1 Like

I totally agree. But I think LOAD MORE button is more simple. Design wise.
You’re not overwhelmed when you see it.
At least in my use case I reaaallly wanna do Load More.

The other day we had a call with @heythere and we added Load More button in a second. But now we can’t figure out how it worked…

You can just set the :items until# to initially load a set number of entries.

If you define that number in a custom state, then it’s simply a case of adding to that number when your ‘Load More’ button is clicked, in order to load more entries into the RG.

7 Likes

You are GENIUS. Let me try and get back to you!

1 Like

:partying_face: This works and it’s brilliant! However there’s one question that I got:

Does it solve the performance issue?
Cause the only reason I want to display data in chunk is to not have to display everything at once, that would exhaust the browser.

Yes it improves the performance if you’re comparing it to display all entries at page load. Not so much if you compare it to lazy loading

What’s the best way to solve lazy loading problem?

What’s the challenge that you’re facing with lazy loading? It’s basically what the “load more” button is doing, but automatically.

I want initial content to render fast.

Any idea how to show the ‘Show More Button’ when the user reach the end of thε RG? (For example he is scrolling Posts and when he comes to the end of the list then appears the Button)

There is a RG Scroll position plugin that outputs the current scroll position and the max position of a specific RG. So you can have a condition on the button to make it visible when the plugin element’s max - current < 200 (or whatever number you want)

Thanks. Any idea without a plugin?

Make your own plugin with JavaScript to read the scroll position, which sounds like way more work :sweat_smile:

Just put the Load More button in the RG cell. Make it not visible. Have a visibilty conditional like this current cell's index is RG's list:count

2 Likes

This is very clever. The only problem is that it breaks the design if you have multiple rows, for example