0👍
We can write a small function that checks scroll position and fires an ajax call to get more data or just get the next slot of data from your JSON object and bind it to HTML. something as below:
$(window).scroll(function() {
if($(window).scrollTop() == $(document).height() - $(window).height()) {
// ajax call or some other logic to show data here
}
});
Or you can use one of the plugins that are available, I am myself using “Waypoint” for one of the same things.
0👍
You could do:
self.dorms = [...self.dorms, ...response.data.data.data]
or
self.dorms = [].concat(self.dorms, response.data.data.data)
or
self.dorms.push(...response.data.data.data)
all result in the same result. Your error should be somewhere else.
Source:stackexchange.com