Reputation: 5
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
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