@vaadin/grid
Advanced tools
Comparing version 24.4.0-alpha22 to 24.4.0-alpha23
{ | ||
"name": "@vaadin/grid", | ||
"version": "24.4.0-alpha22", | ||
"version": "24.4.0-alpha23", | ||
"publishConfig": { | ||
@@ -49,10 +49,10 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/a11y-base": "24.4.0-alpha22", | ||
"@vaadin/checkbox": "24.4.0-alpha22", | ||
"@vaadin/component-base": "24.4.0-alpha22", | ||
"@vaadin/lit-renderer": "24.4.0-alpha22", | ||
"@vaadin/text-field": "24.4.0-alpha22", | ||
"@vaadin/vaadin-lumo-styles": "24.4.0-alpha22", | ||
"@vaadin/vaadin-material-styles": "24.4.0-alpha22", | ||
"@vaadin/vaadin-themable-mixin": "24.4.0-alpha22", | ||
"@vaadin/a11y-base": "24.4.0-alpha23", | ||
"@vaadin/checkbox": "24.4.0-alpha23", | ||
"@vaadin/component-base": "24.4.0-alpha23", | ||
"@vaadin/lit-renderer": "24.4.0-alpha23", | ||
"@vaadin/text-field": "24.4.0-alpha23", | ||
"@vaadin/vaadin-lumo-styles": "24.4.0-alpha23", | ||
"@vaadin/vaadin-material-styles": "24.4.0-alpha23", | ||
"@vaadin/vaadin-themable-mixin": "24.4.0-alpha23", | ||
"lit": "^3.0.0" | ||
@@ -69,3 +69,3 @@ }, | ||
], | ||
"gitHead": "8e5223bcb61a5561fd984db5d11b31a73ec98eaa" | ||
"gitHead": "a2d703efa3acbb60e1dfece97c506674e0bec19d" | ||
} |
@@ -324,5 +324,15 @@ /** | ||
_onDataProviderPageReceived() { | ||
// With the new items added, update the cache size and the grid's effective size | ||
this._flatSize = this._dataProviderController.flatSize; | ||
// If the page response affected the flat size | ||
if (this._flatSize !== this._dataProviderController.flatSize) { | ||
// Schedule an update of all rendered rows by _debouncerApplyCachedData, | ||
// to ensure that all pages associated with the rendered rows are loaded. | ||
this._shouldUpdateAllRenderedRowsAfterPageLoad = true; | ||
// TODO: Updating the flat size property can still result in a synchonous virtualizer update | ||
// if the size change requires the virtualizer to increase the amount of physical elements | ||
// to display new items e.g. the viewport fits 10 items and the size changes from 1 to 10. | ||
// This is something to be optimized in the future. | ||
this._flatSize = this._dataProviderController.flatSize; | ||
} | ||
// After updating the cache, check if some of the expanded items should have sub-caches loaded | ||
@@ -342,5 +352,8 @@ this._getRenderedRows().forEach((row) => { | ||
const shouldUpdateAllRenderedRowsAfterPageLoad = this._shouldUpdateAllRenderedRowsAfterPageLoad; | ||
this._shouldUpdateAllRenderedRowsAfterPageLoad = false; | ||
this._getRenderedRows().forEach((row) => { | ||
const { item } = this._dataProviderController.getFlatIndexContext(row.index); | ||
if (item) { | ||
if (item || shouldUpdateAllRenderedRowsAfterPageLoad) { | ||
this._getItem(row.index, row); | ||
@@ -347,0 +360,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
668714
16114
+ Added@vaadin/a11y-base@24.4.0-alpha23(transitive)
+ Added@vaadin/checkbox@24.4.0-alpha23(transitive)
+ Added@vaadin/component-base@24.4.0-alpha23(transitive)
+ Added@vaadin/field-base@24.4.0-alpha23(transitive)
+ Added@vaadin/icon@24.4.0-alpha23(transitive)
+ Added@vaadin/input-container@24.4.0-alpha23(transitive)
+ Added@vaadin/lit-renderer@24.4.0-alpha23(transitive)
+ Added@vaadin/text-field@24.4.0-alpha23(transitive)
+ Added@vaadin/vaadin-lumo-styles@24.4.0-alpha23(transitive)
+ Added@vaadin/vaadin-material-styles@24.4.0-alpha23(transitive)
+ Added@vaadin/vaadin-themable-mixin@24.4.0-alpha23(transitive)
- Removed@vaadin/a11y-base@24.4.0-alpha22(transitive)
- Removed@vaadin/checkbox@24.4.0-alpha22(transitive)
- Removed@vaadin/component-base@24.4.0-alpha22(transitive)
- Removed@vaadin/field-base@24.4.0-alpha22(transitive)
- Removed@vaadin/icon@24.4.0-alpha22(transitive)
- Removed@vaadin/input-container@24.4.0-alpha22(transitive)
- Removed@vaadin/lit-renderer@24.4.0-alpha22(transitive)
- Removed@vaadin/text-field@24.4.0-alpha22(transitive)
- Removed@vaadin/vaadin-lumo-styles@24.4.0-alpha22(transitive)
- Removed@vaadin/vaadin-material-styles@24.4.0-alpha22(transitive)
- Removed@vaadin/vaadin-themable-mixin@24.4.0-alpha22(transitive)