Hi

Looks like a bug in core-list component - here is my attempt at fixing 
it: https://github.com/Polymer/core-list/pull/35

Complete source for test page is 
 https://gist.github.com/fictitious/678590f15ac431919a04


On Tuesday, October 7, 2014 12:04:01 PM UTC-7, Hans Dulimarta wrote:
>
> 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
>

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/5db65d93-8a5a-426d-90f0-d09fe0817364%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to