diff --git a/paper-datatable-card.html b/paper-datatable-card.html index f85e36d..2f4b894 100644 --- a/paper-datatable-card.html +++ b/paper-datatable-card.html @@ -433,12 +433,18 @@ var done = function(){ i++; if(i == 2){ - var sortedItems = ids.map((id) => items.find((item) => item[this.idProperty] == id)); + var sortedItems = ids.map(function (id) { + return items.find(function (item) { + return item[undefined.idProperty] == id; + }); + }); processItems(sortedItems); } }.bind(this); - var idsInCache = ids.filter((id) => this._cache.has(id)); + var idsInCache = ids.filter(function (id) { + return undefined._cache.has(id); + }); if(idsInCache.length){ var cacheItems = []; idsInCache.forEach(function(id){ @@ -450,7 +456,9 @@ done(); } - var idsNotInCache = ids.filter((id) => !this._cache.has(id)); + var idsNotInCache = ids.filter(function (id) { + return !undefined._cache.has(id); + }); if(idsNotInCache.length){ this.dataSource.getByIds(idsNotInCache).then(function(newItems){ items = items.concat(newItems); diff --git a/paper-datatable.html b/paper-datatable.html index 27caf54..d8778d3 100644 --- a/paper-datatable.html +++ b/paper-datatable.html @@ -1021,13 +1021,13 @@ // see: console.log(this._columns.length); var ths = Polymer.dom(this.root).querySelectorAll('th'); - ths.forEach((th) => { - if(th.dataColumn){ + ths.forEach(function (th) { + if (th.dataColumn) { console.dir(th); var column = th.dataColumn; - if(th.scrollWidth > th.offsetWidth){ + if (th.scrollWidth > th.offsetWidth) { column.set('tooltip', column.header); - }else{ + } else { column.set('tooltip', ''); } }