1
votes

I've converted the polymer core elements demo code for core-list but, it seems the selection functionality does not work.

On the below link's source code, it has methods "selected" and "tokenList", but I cannot find these methods in the java script code.

Polymer - Core Elements - Core List

On dart however, I just added those two fields on my Object, but did not write anything aside from that. It rendered but the selection function is not working.

Any ideas how to properly convert the above link to dart code?

Dart HTML

<core-list-dart id="list" data="{{listPerson}}" height="80">
  <template>
    <div class="item {{ {selected: selected} | tokenList }}">
      <div class="message">
        <span class="lastname">{{lastName}}</span>
        <span class="firstname">{{firstName}}</span>
      </div>
    </div>
  </template>
</core-list-dart>

Dart Class

final List<Person> listPerson = toObservable([]);

Class Person

class Person {
  String firstName, lastName;
  bool selected;
  var tokenList;
}
1

1 Answers