At first sight, adding event handling for repeated items looks easy. You just handling events of repeated items inside Repeater loop methods there you have all needed data and scope with selector $item().
JavaScript
x
12
1
$w("#repeater").onItemReady(($item, itemData, index) => {2
// it look easy3
$item("#repeatedButton").onClick((event) => {4
// we have all we need5
console.log(6
$item("#repeatedContainer"),7
itemData,8
index,9
);10
});11
});12
What's wrong with this approach?
from DZone.com Feed https://ift.tt/3c3siCH
No comments:
Post a Comment