I have been looking for answer to the following problem with core-list and on-core-active handler.
My core-list is as follows:
<core-list data="{{myarr}}" on-core-activate="{{rowSelected}}">
<ol>
<template>
<li>{{text}} /* (1) handler works here */
<ul>
<template repeat="{{options}}">
<li>{{}}</li> /* (2) handler does not work here */
</template>
</ul>
</template>
</ol>
</core-list>
my source array is :
myarr = [
{text: "Question 1",
options : ["Opt a", "Opt b", "Opt c"]},
{text: "Question 2",
options : ["Opt a", "Opt b", "Opt c"]},
...
];
and the handler function is:
rowSelected: function(evt, dtl, snd) {
// dtl.item and dt.data show correct value when (1) was tapped
// dtl.item and dt.data are undefined when (2) was tapped
}
The HTML output is rendered correctly but event handling is not what I expect to see.
Tapping on the list item generated by the outer template (marker (1) above) works fine, but tapping on the list item from the inner template (marker (2) above) gives undefined object on dtl.data and dtl.item inside the rowSelected function.
What am I missing here? If I can't use core-list for this purpose, what are my other options?
Thanks