@opencorestack/opengridx 2.0.3 → 2.0.4
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 +9 -0
- package/dist/index.d.ts +7 -0
- package/dist/opengridx.es.js +2457 -2432
- package/dist/opengridx.es.js.map +1 -1
- package/dist/opengridx.umd.js +16 -16
- package/dist/opengridx.umd.js.map +1 -1
- package/docs/API_REFERENCE.md +1 -0
- package/docs/components/datagrid.md +1 -0
- package/docs/features/virtualization.md +30 -9
- package/lib/components/DataGrid/DataGrid.tsx +3 -1
- package/lib/hooks/core/useGridScrollSync.ts +62 -15
- package/lib/hooks/core/useGridVirtualization.ts +4 -1
- package/lib/types/index.ts +7 -0
- package/llms.txt +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,15 @@
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [2.0.4] — 2026-09-10
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Adaptive overscan based on scroll velocity** — `useGridScrollSync` now tracks scroll velocity (px/ms) on every scroll event and maps it to a dynamic overscan tier (3 / 5 / 12 / 20 / 30 rows). All three values (`scrollTop`, `scrollLeft`, `overscanRows`) are bundled into a single state update per RAF frame so `useGridVirtualization` recomputes exactly once per frame. 200 ms after scrolling stops, the overscan decays back to the floor set by `overscanRowCount`.
|
|
13
|
+
- **`overscanRowCount` prop** — new `DataGridProps` field (`number`, default `3`). Sets the minimum overscan floor; the adaptive algorithm always produces a value ≥ this prop. Increasing it pre-renders more rows at rest; decreasing it saves idle memory.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
8
17
|
## [2.0.3] — 2026-09-10
|
|
9
18
|
|
|
10
19
|
### Documentation
|
package/dist/index.d.ts
CHANGED
|
@@ -102,6 +102,13 @@ export declare interface DataGridProps<R extends GridRowModel = GridRowModel> {
|
|
|
102
102
|
headerHeight?: number;
|
|
103
103
|
/** If true, the grid height will adjust to match the total height of its rows. */
|
|
104
104
|
autoHeight?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Minimum number of rows to render outside the visible viewport (overscan buffer).
|
|
107
|
+
* The grid adapts this value upward automatically based on scroll velocity to prevent
|
|
108
|
+
* blank flashes during fast scrolling. This prop sets the floor — the buffer never
|
|
109
|
+
* drops below this value regardless of scroll speed. Defaults to `3`.
|
|
110
|
+
*/
|
|
111
|
+
overscanRowCount?: number;
|
|
105
112
|
/** Sorting mode: 'client' (default) or 'server'. */
|
|
106
113
|
sortingMode?: 'client' | 'server';
|
|
107
114
|
/** The current sorting model. */
|