I want to know how I can get a specific item's view from the collection using index or some other way. @farfromrefug told me about getViewForItemAtIndex in #17 but haven't been able to make it work. I need to do some work on each item of the list when the user presses a button (not part of collection). Here's my code:
const collection = page.getViewById('collection');
for (var i = 0; i < listItems.length; i++) {
const listItem = collection.getViewForItemAtIndex(i);
console.log(listItem); // undefined
}
Since there's no documentation on it, I'm just shooting in the dark here.
I want to know how I can get a specific item's view from the collection using index or some other way. @farfromrefug told me about
getViewForItemAtIndex
in #17 but haven't been able to make it work. I need to do some work on each item of the list when the user presses a button (not part of collection). Here's my code:Since there's no documentation on it, I'm just shooting in the dark here.