Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions paper-datatable-card.html
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand All @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions paper-datatable.html
Original file line number Diff line number Diff line change
Expand Up @@ -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', '');
}
}
Expand Down