OLD | NEW |
1 | 1 |
2 <!--- | 2 <!--- |
3 | 3 |
4 This README is automatically generated from the comments in these files: | 4 This README is automatically generated from the comments in these files: |
5 iron-list.html | 5 iron-list.html |
6 | 6 |
7 Edit those files, and our readme bot will duplicate them over here! | 7 Edit those files, and our readme bot will duplicate them over here! |
8 Edit this file, and the bot will squash your changes :) | 8 Edit this file, and the bot will squash your changes :) |
9 | 9 |
10 The bot does some handling of markdown. Please file a bug if it does the wrong | 10 The bot does some handling of markdown. Please file a bug if it does the wrong |
11 thing! https://github.com/PolymerLabs/tedium/issues | 11 thing! https://github.com/PolymerLabs/tedium/issues |
12 | 12 |
13 --> | 13 --> |
14 | 14 |
15 [](https://travis-ci.org/PolymerElements/iron-list) | 15 [](https://travis-ci.org/PolymerElements/iron-list) |
16 | 16 |
17 _[Demo and API Docs](https://elements.polymer-project.org/elements/iron-list)_ | 17 _[Demo and API docs](https://elements.polymer-project.org/elements/iron-list)_ |
18 | 18 |
19 | 19 |
20 ##<iron-list> | 20 ##<iron-list> |
21 | 21 |
22 `iron-list` displays a virtual, 'infinite' list. The template inside | 22 `iron-list` displays a virtual, 'infinite' list. The template inside |
23 the iron-list element represents the DOM to create for each list item. | 23 the iron-list element represents the DOM to create for each list item. |
24 The `items` property specifies an array of list item data. | 24 The `items` property specifies an array of list item data. |
25 | 25 |
26 For performance reasons, not every item in the list is rendered at once; | 26 For performance reasons, not every item in the list is rendered at once; |
27 instead a small subset of actual template elements *(enough to fill the viewport
)* | 27 instead a small subset of actual template elements *(enough to fill the viewport
)* |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 visible on the screen. e.g. the page has 500 nodes, but only 20 are visible at t
he time. | 130 visible on the screen. e.g. the page has 500 nodes, but only 20 are visible at t
he time. |
131 This is why we refer to it as a `virtual` list. In this case, a `dom-repeat` wil
l still | 131 This is why we refer to it as a `virtual` list. In this case, a `dom-repeat` wil
l still |
132 create 500 nodes which could slow down the web app, but `iron-list` will only cr
eate 20. | 132 create 500 nodes which could slow down the web app, but `iron-list` will only cr
eate 20. |
133 | 133 |
134 However, having an `iron-list` does not mean that you can load all the data at o
nce. | 134 However, having an `iron-list` does not mean that you can load all the data at o
nce. |
135 Say, you have a million records in the database, you want to split the data into
pages | 135 Say, you have a million records in the database, you want to split the data into
pages |
136 so you can bring a page at the time. The page could contain 500 items, and iron-
list | 136 so you can bring a page at the time. The page could contain 500 items, and iron-
list |
137 will only render 20. | 137 will only render 20. |
138 | 138 |
139 | 139 |
OLD | NEW |