Aryan Srivastava
Aryan Srivastava

Reputation: 5

How to set dynamically count Items in onsen ui lazy load

Please help me with the dynamic setting of total item count in "onsen ui" jQuery.

In example the count item is set as hard coded as below:

countItems: function() {
    return 10000;
}

In my case the data is coming from the JSON call that can be of any length so what will be the best way to achieve this?

Upvotes: 0

Views: 614

Answers (1)

Andreas Argelius
Andreas Argelius

Reputation: 3614

If you have some source array that you want to use in your list you can just return the length of the list:

countItems: function() {
  return myList.length;
}

Upvotes: 0

Related Questions