I have a custom block of code that reaches out to an API and renders a repeater with the results that are returned. Because this data is dynamic for each user I can not store it into a database directly and instead am creating an array of objects and passing that value to the repeater directly.
Because of the way Wix repeaters work I do have a database with all the fields that I am using to render to the repeater, however it is always blank.
So far everything works great. I can save my data to a resorts array and render it to the repeater with $w ( “#resortsRepeater” ). data = resorts
The only problem is sometimes there is a LOT of data returned from the API and so I need to implement some sort of pagination. To accomplish this I set up a button and connected it to the same dataset that I have my repeater connected to and set the Click Action to “Load More”. However the repeater still renders all the returned results and the Load More button is greyed out.
How can I limit the amount of items that are displayed by the repeater at one time?