Skip to content

Commit

Permalink
Merge pull request #486 from vaadin/fix/2.0-shadow
Browse files Browse the repository at this point in the history
Fixed issues with native shadow
  • Loading branch information
Saulis committed Oct 14, 2016
2 parents 4b5c006 + 492d4ed commit e8cdf0a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
17 changes: 10 additions & 7 deletions vaadin-grid-data-source-behavior.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
*/
pageSize: {
type: Number,
value: 50
value: 50,
observer: '_pageSizeChanged'
},

/**
Expand Down Expand Up @@ -99,14 +100,10 @@
},
},

observers: [
'clearCache(pageSize)'
],

_getCachedItem: function(index) {
var page = this._getPageForIndex(index);

var p = this._cache[page];
var p = this._cache && this._cache[page];

if (p) {
return p[index - page * this.pageSize];
Expand Down Expand Up @@ -139,7 +136,7 @@

_uncachedPagesForPhysicalItems: function() {
return this._pagesForPhysicalItems().filter(function(page) {
return this._cache === undefined || this._cache[page] === undefined;
return this._cache !== undefined && this._cache[page] === undefined;
}.bind(this));
},

Expand Down Expand Up @@ -240,6 +237,12 @@

_flushItemsDebouncer: function() {
this.flushDebouncer('load');
},

_pageSizeChanged: function(pageSize, oldPageSize) {
if (oldPageSize !== undefined && pageSize !== oldPageSize) {
this.clearCache();
}
}

};
Expand Down
2 changes: 1 addition & 1 deletion vaadin-grid-row-details-behavior.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
},

_isExpanded: function(item) {
return this.expandedItems.indexOf(item) !== -1;
return this.expandedItems && this.expandedItems.indexOf(item) !== -1;
},

expandItem: function(item) {
Expand Down
5 changes: 5 additions & 0 deletions vaadin-grid-table.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@
}

/* Theme styles */
:host {
box-sizing: border-box;
border: 1px solid var(--vaadin-grid-border-color);
}

thead tr:last-child th {
border-bottom: 1px solid var(--vaadin-grid-border-color);
}
Expand Down
1 change: 0 additions & 1 deletion vaadin-grid.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
}

#scroller {
border: 1px solid var(--vaadin-grid-border-color);
height: 100%;
width: 100%;
}
Expand Down

0 comments on commit e8cdf0a

Please sign in to comment.