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

Commit 89cc2f1

Browse files
committed
Putting repeat on the list template is now optional. Including it was a source of confusion since the list sets the model itself.
1 parent bb458ae commit 89cc2f1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

core-list.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
For performance reasons, not every item in the list is rendered at once.
2222
2323
<core-list data="{{data}}" height="80">
24-
<template repeat>
24+
<template>
2525
<div class="{{ {selected: selected} | tokenList }}">List row: {{index}}</div>
2626
</template>
2727
</core-list>
@@ -183,6 +183,7 @@
183183
this.updateItem(i, i);
184184
}
185185
this.template.model = this._physicalData;
186+
this.template.setAttribute('repeat', '');
186187
},
187188

188189
initializeItems: function() {

demo.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
}
8282
</style>
8383
<core-list id="list" data="{{data}}" height="80">
84-
<template repeat>
84+
<template>
8585
<div class="item {{ {selected: selected} | tokenList }}">
8686
<div class="message" style="background-image: url(images/{{index % 4}}.png);">
8787
<span class="from">{{name}}</span>

0 commit comments

Comments
 (0)