@vaadin/grid 24.2.0-dev.538d07bdf → 24.2.0-dev.e9803eea7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +10 -10
- package/src/vaadin-grid-data-provider-mixin.js +13 -12
- package/src/vaadin-grid.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/grid",
|
|
3
|
-
"version": "24.2.0-dev.
|
|
3
|
+
"version": "24.2.0-dev.e9803eea7",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
48
48
|
"@polymer/polymer": "^3.0.0",
|
|
49
|
-
"@vaadin/a11y-base": "24.2.0-dev.
|
|
50
|
-
"@vaadin/checkbox": "24.2.0-dev.
|
|
51
|
-
"@vaadin/component-base": "24.2.0-dev.
|
|
52
|
-
"@vaadin/lit-renderer": "24.2.0-dev.
|
|
53
|
-
"@vaadin/text-field": "24.2.0-dev.
|
|
54
|
-
"@vaadin/vaadin-lumo-styles": "24.2.0-dev.
|
|
55
|
-
"@vaadin/vaadin-material-styles": "24.2.0-dev.
|
|
56
|
-
"@vaadin/vaadin-themable-mixin": "24.2.0-dev.
|
|
49
|
+
"@vaadin/a11y-base": "24.2.0-dev.e9803eea7",
|
|
50
|
+
"@vaadin/checkbox": "24.2.0-dev.e9803eea7",
|
|
51
|
+
"@vaadin/component-base": "24.2.0-dev.e9803eea7",
|
|
52
|
+
"@vaadin/lit-renderer": "24.2.0-dev.e9803eea7",
|
|
53
|
+
"@vaadin/text-field": "24.2.0-dev.e9803eea7",
|
|
54
|
+
"@vaadin/vaadin-lumo-styles": "24.2.0-dev.e9803eea7",
|
|
55
|
+
"@vaadin/vaadin-material-styles": "24.2.0-dev.e9803eea7",
|
|
56
|
+
"@vaadin/vaadin-themable-mixin": "24.2.0-dev.e9803eea7"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@esm-bundle/chai": "^4.3.4",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"web-types.json",
|
|
66
66
|
"web-types.lit.json"
|
|
67
67
|
],
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "a065b79b9d5a189e457fab312cc8aff0d7f2f910"
|
|
69
69
|
}
|
|
@@ -180,7 +180,7 @@ export const DataProviderMixin = (superClass) =>
|
|
|
180
180
|
this.__updateLoading(el, false);
|
|
181
181
|
this._updateItem(el, item);
|
|
182
182
|
if (this._isExpanded(item)) {
|
|
183
|
-
this._dataProviderController.
|
|
183
|
+
this._dataProviderController.ensureFlatIndexHierarchy(index);
|
|
184
184
|
}
|
|
185
185
|
} else {
|
|
186
186
|
this.__updateLoading(el, true);
|
|
@@ -282,7 +282,7 @@ export const DataProviderMixin = (superClass) =>
|
|
|
282
282
|
|
|
283
283
|
// After updating the cache, check if some of the expanded items should have sub-caches loaded
|
|
284
284
|
this._getRenderedRows().forEach((row) => {
|
|
285
|
-
this._dataProviderController.
|
|
285
|
+
this._dataProviderController.ensureFlatIndexHierarchy(row.index);
|
|
286
286
|
});
|
|
287
287
|
|
|
288
288
|
this._hasData = true;
|
|
@@ -305,7 +305,7 @@ export const DataProviderMixin = (superClass) =>
|
|
|
305
305
|
});
|
|
306
306
|
|
|
307
307
|
// If the grid is not loading anything, flush the debouncer immediately
|
|
308
|
-
if (!this._dataProviderController.isLoading) {
|
|
308
|
+
if (!this._dataProviderController.isLoading()) {
|
|
309
309
|
this._debouncerApplyCachedData.flush();
|
|
310
310
|
}
|
|
311
311
|
}
|
|
@@ -317,16 +317,18 @@ export const DataProviderMixin = (superClass) =>
|
|
|
317
317
|
this._dataProviderController.clearCache();
|
|
318
318
|
this._hasData = false;
|
|
319
319
|
this.__updateVisibleRows();
|
|
320
|
-
|
|
320
|
+
|
|
321
|
+
if (!this._effectiveSize) {
|
|
322
|
+
this._dataProviderController.loadFirstPage();
|
|
323
|
+
}
|
|
321
324
|
}
|
|
322
325
|
|
|
323
326
|
/** @private */
|
|
324
327
|
_pageSizeChanged(pageSize, oldPageSize) {
|
|
328
|
+
this._dataProviderController.setPageSize(pageSize);
|
|
329
|
+
|
|
325
330
|
if (oldPageSize !== undefined && pageSize !== oldPageSize) {
|
|
326
|
-
this.
|
|
327
|
-
this._hasData = false;
|
|
328
|
-
this.__updateVisibleRows();
|
|
329
|
-
this._ensureFirstPageLoaded();
|
|
331
|
+
this.clearCache();
|
|
330
332
|
}
|
|
331
333
|
}
|
|
332
334
|
|
|
@@ -347,8 +349,7 @@ export const DataProviderMixin = (superClass) =>
|
|
|
347
349
|
this._dataProviderController.setDataProvider(dataProvider ? dataProvider.bind(this) : null);
|
|
348
350
|
|
|
349
351
|
if (oldDataProvider !== undefined) {
|
|
350
|
-
this.
|
|
351
|
-
this.__updateVisibleRows();
|
|
352
|
+
this.clearCache();
|
|
352
353
|
}
|
|
353
354
|
|
|
354
355
|
this._ensureFirstPageLoaded();
|
|
@@ -365,7 +366,7 @@ export const DataProviderMixin = (superClass) =>
|
|
|
365
366
|
if (!this._hasData) {
|
|
366
367
|
// Load data before adding rows to make sure they have content when
|
|
367
368
|
// rendered for the first time.
|
|
368
|
-
this._dataProviderController.
|
|
369
|
+
this._dataProviderController.loadFirstPage();
|
|
369
370
|
}
|
|
370
371
|
}
|
|
371
372
|
|
|
@@ -419,7 +420,7 @@ export const DataProviderMixin = (superClass) =>
|
|
|
419
420
|
this._scrollToFlatIndex(targetIndex);
|
|
420
421
|
}
|
|
421
422
|
|
|
422
|
-
if (this._dataProviderController.isLoading || !this.clientHeight) {
|
|
423
|
+
if (this._dataProviderController.isLoading() || !this.clientHeight) {
|
|
423
424
|
this.__pendingScrollToIndexes = indexes;
|
|
424
425
|
}
|
|
425
426
|
}
|
package/src/vaadin-grid.js
CHANGED
|
@@ -738,7 +738,7 @@ class Grid extends ElementMixin(
|
|
|
738
738
|
if (!this._columnTree) {
|
|
739
739
|
return; // No columns
|
|
740
740
|
}
|
|
741
|
-
if (isElementHidden(this) || this._dataProviderController.isLoading) {
|
|
741
|
+
if (isElementHidden(this) || this._dataProviderController.isLoading()) {
|
|
742
742
|
this.__pendingRecalculateColumnWidths = true;
|
|
743
743
|
return;
|
|
744
744
|
}
|
|
@@ -751,7 +751,7 @@ class Grid extends ElementMixin(
|
|
|
751
751
|
if (
|
|
752
752
|
this.__pendingRecalculateColumnWidths &&
|
|
753
753
|
!isElementHidden(this) &&
|
|
754
|
-
!this._dataProviderController.isLoading &&
|
|
754
|
+
!this._dataProviderController.isLoading() &&
|
|
755
755
|
this.__hasRowsWithClientHeight()
|
|
756
756
|
) {
|
|
757
757
|
this.__pendingRecalculateColumnWidths = false;
|