Items API Events
items:lazyload:batch
Fires when a new batch of Items have been loaded.
You would want to be notified about this event firing, for example, to know whether a specific Item has loaded so that you can navigate to it.
Note This event requires the lazyload
init option to be enabled.
Examples
itemsApp.on('items:lazyload:batch', function (indicesAppended) {
console.log('This code executes when each batch of Items has completed loading.');
});
Callback arguments
-
indicesAppended array
An array of integers containing the zero-based index of the Items that have been loaded in current batch.
Related articles
- The
lazyload
init option which enables lazy loading of Items. - The
items:lazyload:complete
event, the event that occurs at the end of the lazy loading process. - The
items:lazyload:error
event, the event that occurs if any of the batches failed to load. - Using Lazy Rendering for Your Assessments