@vaadin/grid
Advanced tools
Comparing version 24.3.7 to 24.3.8
{ | ||
"name": "@vaadin/grid", | ||
"version": "24.3.7", | ||
"version": "24.3.8", | ||
"publishConfig": { | ||
@@ -49,10 +49,10 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/a11y-base": "~24.3.7", | ||
"@vaadin/checkbox": "~24.3.7", | ||
"@vaadin/component-base": "~24.3.7", | ||
"@vaadin/lit-renderer": "~24.3.7", | ||
"@vaadin/text-field": "~24.3.7", | ||
"@vaadin/vaadin-lumo-styles": "~24.3.7", | ||
"@vaadin/vaadin-material-styles": "~24.3.7", | ||
"@vaadin/vaadin-themable-mixin": "~24.3.7" | ||
"@vaadin/a11y-base": "~24.3.8", | ||
"@vaadin/checkbox": "~24.3.8", | ||
"@vaadin/component-base": "~24.3.8", | ||
"@vaadin/lit-renderer": "~24.3.8", | ||
"@vaadin/text-field": "~24.3.8", | ||
"@vaadin/vaadin-lumo-styles": "~24.3.8", | ||
"@vaadin/vaadin-material-styles": "~24.3.8", | ||
"@vaadin/vaadin-themable-mixin": "~24.3.8" | ||
}, | ||
@@ -69,3 +69,3 @@ "devDependencies": { | ||
], | ||
"gitHead": "d4dfa8f9b8621e4d33033464393dd811de6d19d8" | ||
"gitHead": "144e479d60d7d52edd4d35aba032c6863c02e878" | ||
} |
@@ -320,7 +320,2 @@ /** | ||
/** @private */ | ||
__hasRowsWithClientHeight() { | ||
return !!Array.from(this.$.items.children).filter((row) => row.clientHeight).length; | ||
} | ||
/** @private */ | ||
__getIntrinsicWidth(col) { | ||
@@ -487,8 +482,22 @@ if (!this.__intrinsicWidthCache.has(col)) { | ||
__tryToRecalculateColumnWidthsIfPending() { | ||
if ( | ||
this.__pendingRecalculateColumnWidths && | ||
!isElementHidden(this) && | ||
!this._dataProviderController.isLoading() && | ||
this.__hasRowsWithClientHeight() | ||
) { | ||
if (!this.__pendingRecalculateColumnWidths || isElementHidden(this) || this._dataProviderController.isLoading()) { | ||
return; | ||
} | ||
// Delay recalculation if any rows are missing an index. | ||
// This can happen during the grid's initialization if the recalculation is triggered | ||
// as a result of the data provider responding synchronously to a page request created | ||
// in the middle of the virtualizer update loop. In this case, rows after the one that | ||
// triggered the page request may not have an index property yet. The lack of index | ||
// prevents _onDataProviderPageReceived from requesting children for these rows, | ||
// resulting in loading state being set to false and the recalculation beginning | ||
// before all the data is loaded. Note, rows without index get updated in later iterations | ||
// of the virtualizer update loop, ensuring the grid eventually reaches a stable state. | ||
const hasRowsWithUndefinedIndex = [...this.$.items.children].some((row) => row.index === undefined); | ||
if (hasRowsWithUndefinedIndex) { | ||
return; | ||
} | ||
const hasRowsWithClientHeight = [...this.$.items.children].some((row) => row.clientHeight > 0); | ||
if (hasRowsWithClientHeight) { | ||
this.__pendingRecalculateColumnWidths = false; | ||
@@ -495,0 +504,0 @@ this.recalculateColumnWidths(); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
662817
15951