@reforgium/data-grid 3.1.0 → 3.1.1
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/CHANGELOG.md +7 -0
- package/fesm2022/{reforgium-data-grid-grid-overlay-scroll.feature-BQFxyNCT.mjs → reforgium-data-grid-grid-overlay-scroll.feature-DkosLX9_.mjs} +2 -2
- package/fesm2022/{reforgium-data-grid-reforgium-data-grid-d5V0EST_.mjs → reforgium-data-grid-reforgium-data-grid-D4fn-nOx.mjs} +11 -5
- package/fesm2022/reforgium-data-grid.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [3.1.1]: 06.04.2026
|
|
2
|
+
|
|
3
|
+
### Fix:
|
|
4
|
+
- `DataGrid`: source/infinity — grid no longer auto-requests pages before the first external fetch; `ensureBufferedRange` and `drainQueuedPages` are now gated by a `hasReceivedData` flag that is only raised after at least one non-empty page arrives via `sync()` outside of a reset cycle; guards stale-store (singleton re-bind), stale queued pages surviving a `clearBuffer()`, and the `queueMicrotask` drain-loop that ran after a buffer reset
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
1
8
|
## [3.1.0]: 02.04.2026
|
|
2
9
|
|
|
3
10
|
### Feat:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as computeScrollbarState, a as clampThumbTop, m as mapThumbTopToScrollTop } from './reforgium-data-grid-reforgium-data-grid-
|
|
1
|
+
import { c as computeScrollbarState, a as clampThumbTop, m as mapThumbTopToScrollTop } from './reforgium-data-grid-reforgium-data-grid-D4fn-nOx.mjs';
|
|
2
2
|
|
|
3
3
|
function createGridOverlayScrollFeature(ctx) {
|
|
4
4
|
const showScrollbar = () => {
|
|
@@ -76,4 +76,4 @@ function createGridOverlayScrollFeature(ctx) {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
export { createGridOverlayScrollFeature };
|
|
79
|
-
//# sourceMappingURL=reforgium-data-grid-grid-overlay-scroll.feature-
|
|
79
|
+
//# sourceMappingURL=reforgium-data-grid-grid-overlay-scroll.feature-DkosLX9_.mjs.map
|
|
@@ -2160,6 +2160,7 @@ function createGridSourceDataFeature(ctx) {
|
|
|
2160
2160
|
let lastSourceVersion = null;
|
|
2161
2161
|
let activeRequests = 0;
|
|
2162
2162
|
let requestGeneration = 0;
|
|
2163
|
+
let hasReceivedData = false;
|
|
2163
2164
|
const resolvedLoading = () => ctx.getSource()?.loading() ?? ctx.getFallbackLoading();
|
|
2164
2165
|
const totalRowCount = () => {
|
|
2165
2166
|
const source = ctx.getSource();
|
|
@@ -2271,7 +2272,7 @@ function createGridSourceDataFeature(ctx) {
|
|
|
2271
2272
|
};
|
|
2272
2273
|
const ensureBufferedRange = (state) => {
|
|
2273
2274
|
const source = ctx.getSource();
|
|
2274
|
-
if (!source || ctx.getMode() !== 'infinity' || state.total <= 0) {
|
|
2275
|
+
if (!source || ctx.getMode() !== 'infinity' || state.total <= 0 || !hasReceivedData) {
|
|
2275
2276
|
return;
|
|
2276
2277
|
}
|
|
2277
2278
|
const pageSize = Math.max(1, source.pageSize || ctx.getFallbackPageSize());
|
|
@@ -2326,7 +2327,11 @@ function createGridSourceDataFeature(ctx) {
|
|
|
2326
2327
|
if (didReset && source.loading()) {
|
|
2327
2328
|
return;
|
|
2328
2329
|
}
|
|
2329
|
-
|
|
2330
|
+
const pageItems = source.items() ?? [];
|
|
2331
|
+
sourcePages.set(Math.max(0, source.page || 0), pageItems);
|
|
2332
|
+
if (!hasReceivedData && !didReset && pageItems.length > 0) {
|
|
2333
|
+
hasReceivedData = true;
|
|
2334
|
+
}
|
|
2330
2335
|
bufferVersion.update((current) => current + 1);
|
|
2331
2336
|
};
|
|
2332
2337
|
const clearState = () => {
|
|
@@ -2336,6 +2341,7 @@ function createGridSourceDataFeature(ctx) {
|
|
|
2336
2341
|
clearBuffer();
|
|
2337
2342
|
};
|
|
2338
2343
|
const clearBuffer = () => {
|
|
2344
|
+
hasReceivedData = false;
|
|
2339
2345
|
requestGeneration++;
|
|
2340
2346
|
if (!sourcePages.size) {
|
|
2341
2347
|
return;
|
|
@@ -2358,7 +2364,7 @@ function createGridSourceDataFeature(ctx) {
|
|
|
2358
2364
|
};
|
|
2359
2365
|
const drainQueuedPages = () => {
|
|
2360
2366
|
const source = ctx.getSource();
|
|
2361
|
-
if (!source || ctx.getMode() !== 'infinity') {
|
|
2367
|
+
if (!source || ctx.getMode() !== 'infinity' || !hasReceivedData) {
|
|
2362
2368
|
return;
|
|
2363
2369
|
}
|
|
2364
2370
|
const maxConcurrentRequests = source.prefetchMode === 'parallel' ? PARALLEL_PREFETCH_REQUESTS : SEQUENTIAL_PREFETCH_REQUESTS;
|
|
@@ -4051,7 +4057,7 @@ class DataGrid {
|
|
|
4051
4057
|
if (this.overlayScrollFeaturePromise) {
|
|
4052
4058
|
return this.overlayScrollFeaturePromise;
|
|
4053
4059
|
}
|
|
4054
|
-
this.overlayScrollFeaturePromise = import('./reforgium-data-grid-grid-overlay-scroll.feature-
|
|
4060
|
+
this.overlayScrollFeaturePromise = import('./reforgium-data-grid-grid-overlay-scroll.feature-DkosLX9_.mjs').then(({ createGridOverlayScrollFeature }) => {
|
|
4055
4061
|
const feature = createGridOverlayScrollFeature({
|
|
4056
4062
|
getScrollElement: () => this.scrollEl()?.nativeElement ?? null,
|
|
4057
4063
|
getThumbTop: () => this.vm.thumbTopPx(),
|
|
@@ -4176,4 +4182,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
4176
4182
|
*/
|
|
4177
4183
|
|
|
4178
4184
|
export { DataGridTypeCellTemplateDirective as D, clampThumbTop as a, DataGridCellTemplateDirective as b, computeScrollbarState as c, DataGridHeaderTemplateDirective as d, DataGridRowDirective as e, DataGridDeclarativeColumn as f, DataGridDeclarativeHeaderDirective as g, DataGridDeclarativeCellDirective as h, DataGridCellEmptyDirective as i, DataGridCellLoadingDirective as j, DataGridStickyRowDirective as k, DataGridSortIconDirective as l, mapThumbTopToScrollTop as m, DataGridExpanderIconDirective as n, DATA_GRID_CONFIG as o, DATA_GRID_HEADER_TEXT_RESOLVER as p, DATA_GRID_TYPE_RENDERERS as q, DATA_GRID_TYPE_TRANSFORMERS as r, DEFAULT_DATA_GRID_DEFAULTS as s, provideDataGridDefaults as t, provideDataGridHeaderTextResolver as u, provideDataGridHeaderTextResolverWithParent as v, provideDataGridTypeRenderers as w, provideDataGridTypeTransformers as x, DataGrid as y };
|
|
4179
|
-
//# sourceMappingURL=reforgium-data-grid-reforgium-data-grid-
|
|
4185
|
+
//# sourceMappingURL=reforgium-data-grid-reforgium-data-grid-D4fn-nOx.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { o as DATA_GRID_CONFIG, p as DATA_GRID_HEADER_TEXT_RESOLVER, q as DATA_GRID_TYPE_RENDERERS, r as DATA_GRID_TYPE_TRANSFORMERS, s as DEFAULT_DATA_GRID_DEFAULTS, y as DataGrid, i as DataGridCellEmptyDirective, j as DataGridCellLoadingDirective, b as DataGridCellTemplateDirective, h as DataGridDeclarativeCellDirective, f as DataGridDeclarativeColumn, g as DataGridDeclarativeHeaderDirective, n as DataGridExpanderIconDirective, d as DataGridHeaderTemplateDirective, e as DataGridRowDirective, l as DataGridSortIconDirective, k as DataGridStickyRowDirective, D as DataGridTypeCellTemplateDirective, t as provideDataGridDefaults, u as provideDataGridHeaderTextResolver, v as provideDataGridHeaderTextResolverWithParent, w as provideDataGridTypeRenderers, x as provideDataGridTypeTransformers } from './reforgium-data-grid-reforgium-data-grid-
|
|
1
|
+
export { o as DATA_GRID_CONFIG, p as DATA_GRID_HEADER_TEXT_RESOLVER, q as DATA_GRID_TYPE_RENDERERS, r as DATA_GRID_TYPE_TRANSFORMERS, s as DEFAULT_DATA_GRID_DEFAULTS, y as DataGrid, i as DataGridCellEmptyDirective, j as DataGridCellLoadingDirective, b as DataGridCellTemplateDirective, h as DataGridDeclarativeCellDirective, f as DataGridDeclarativeColumn, g as DataGridDeclarativeHeaderDirective, n as DataGridExpanderIconDirective, d as DataGridHeaderTemplateDirective, e as DataGridRowDirective, l as DataGridSortIconDirective, k as DataGridStickyRowDirective, D as DataGridTypeCellTemplateDirective, t as provideDataGridDefaults, u as provideDataGridHeaderTextResolver, v as provideDataGridHeaderTextResolverWithParent, w as provideDataGridTypeRenderers, x as provideDataGridTypeTransformers } from './reforgium-data-grid-reforgium-data-grid-D4fn-nOx.mjs';
|
|
2
2
|
//# sourceMappingURL=reforgium-data-grid.mjs.map
|
package/package.json
CHANGED