Sneak Peeking 1.2.2: Lazy Repeat (or Infinite Scrolling)
One of the features that the upcoming release of OnsenUI provides is the
ons-lazy-repeatcomponent. Frequently we need to load lists of elements that are large enough to slow down the app or even freeze it until the loading is finished, worsening the user experience. Here is where the new
Click here to see the original article
How we can calculate item height dynamically in calculateItemHeight ? Could you please give us an example ?
You use the
calculateItemHeightfunction. It should return the number of height in pixels.
I made a simple example:
In this example I just return a different height depending on if the index is an odd or even number. Normally you need some function that figures out how high the item is based on the content.
Hey, Can you explain more about the variables index and itemScope of the function configureItemScope. I would like to be able to call multiple items per request but I am having trouble understanding how this works