8 {name: "loadMoreButton", kind: "onyx.Button", onclick: "loadMore", content: "Load More"}
10 addItems: function(items) {
11 this.$.records.createComponents(items, {kind: this.listKind});
12 for (var i = 0; i < items.length; i++) {
13 var r = parseInt(items[i].record);
14 if (r < this.lastRecord || this.lastRecord == null)
17 this.$.records.render();
18 if (this.lastRecord == 0)
19 this.$.loadMoreButton.hide();
21 loadMore: function() {
22 if (this.lastRecord == 0)
25 if (this.lastRecord != null) {
26 var to = this.lastRecord - 1;
27 var from = this.lastRecord - 50;
30 this.loadItems(from, to);
35 loadItems: function(from, to) { }