Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Putting repeat on the list template is now optional. Including it was…
Browse files Browse the repository at this point in the history
… a source of confusion since the list sets the model itself.
  • Loading branch information
sorvell committed Jun 2, 2014
1 parent bb458ae commit 89cc2f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion core-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
For performance reasons, not every item in the list is rendered at once.
<core-list data="{{data}}" height="80">
<template repeat>
<template>
<div class="{{ {selected: selected} | tokenList }}">List row: {{index}}</div>
</template>
</core-list>
Expand Down Expand Up @@ -183,6 +183,7 @@
this.updateItem(i, i);
}
this.template.model = this._physicalData;
this.template.setAttribute('repeat', '');
},

initializeItems: function() {
Expand Down
2 changes: 1 addition & 1 deletion demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
}
</style>
<core-list id="list" data="{{data}}" height="80">
<template repeat>
<template>
<div class="item {{ {selected: selected} | tokenList }}">
<div class="message" style="background-image: url(images/{{index % 4}}.png);">
<span class="from">{{name}}</span>
Expand Down

0 comments on commit 89cc2f1

Please sign in to comment.