@vaadin/component-base 24.3.0-alpha10 → 24.3.0-alpha11
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/component-base",
|
|
3
|
-
"version": "24.3.0-
|
|
3
|
+
"version": "24.3.0-alpha11",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"@vaadin/testing-helpers": "^0.6.0",
|
|
43
43
|
"sinon": "^13.0.2"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "123cf569a1b6ef6f4ef5fe8e60cb8d988699b98c"
|
|
46
46
|
}
|
|
@@ -68,13 +68,12 @@ export class DataProviderController extends EventTarget {
|
|
|
68
68
|
constructor(host, { size, pageSize, isExpanded, getItemId, dataProvider, dataProviderParams }) {
|
|
69
69
|
super();
|
|
70
70
|
this.host = host;
|
|
71
|
-
this.size = size;
|
|
72
71
|
this.pageSize = pageSize;
|
|
73
72
|
this.getItemId = getItemId;
|
|
74
73
|
this.isExpanded = isExpanded;
|
|
75
74
|
this.dataProvider = dataProvider;
|
|
76
75
|
this.dataProviderParams = dataProviderParams;
|
|
77
|
-
this.rootCache = this.__createRootCache();
|
|
76
|
+
this.rootCache = this.__createRootCache(size);
|
|
78
77
|
}
|
|
79
78
|
|
|
80
79
|
/**
|
|
@@ -102,17 +101,6 @@ export class DataProviderController extends EventTarget {
|
|
|
102
101
|
return this.rootCache.isLoading;
|
|
103
102
|
}
|
|
104
103
|
|
|
105
|
-
/**
|
|
106
|
-
* Sets the size for the root cache and recalculates the flattened size.
|
|
107
|
-
*
|
|
108
|
-
* @param {number} size
|
|
109
|
-
*/
|
|
110
|
-
setSize(size) {
|
|
111
|
-
this.size = size;
|
|
112
|
-
this.rootCache.size = size;
|
|
113
|
-
this.recalculateFlatSize();
|
|
114
|
-
}
|
|
115
|
-
|
|
116
104
|
/**
|
|
117
105
|
* Sets the page size and clears the cache.
|
|
118
106
|
*
|
|
@@ -144,7 +132,7 @@ export class DataProviderController extends EventTarget {
|
|
|
144
132
|
* Clears the cache.
|
|
145
133
|
*/
|
|
146
134
|
clearCache() {
|
|
147
|
-
this.rootCache = this.__createRootCache();
|
|
135
|
+
this.rootCache = this.__createRootCache(this.rootCache.size);
|
|
148
136
|
}
|
|
149
137
|
|
|
150
138
|
/**
|
|
@@ -228,8 +216,8 @@ export class DataProviderController extends EventTarget {
|
|
|
228
216
|
}
|
|
229
217
|
|
|
230
218
|
/** @private */
|
|
231
|
-
__createRootCache() {
|
|
232
|
-
return new Cache(this.__cacheContext, this.pageSize,
|
|
219
|
+
__createRootCache(size) {
|
|
220
|
+
return new Cache(this.__cacheContext, this.pageSize, size);
|
|
233
221
|
}
|
|
234
222
|
|
|
235
223
|
/** @private */
|
package/src/define.js
CHANGED