@etsoo/react 1.8.59 → 1.8.60
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/lib/cjs/components/GridLoader.d.ts +1 -1
- package/lib/cjs/components/ScrollerGrid.js +1 -2
- package/lib/cjs/components/ScrollerList.js +1 -2
- package/lib/mjs/components/GridLoader.d.ts +1 -1
- package/lib/mjs/components/ScrollerGrid.js +1 -2
- package/lib/mjs/components/ScrollerList.js +1 -2
- package/package.json +4 -4
- package/src/components/GridLoader.ts +5 -1
- package/src/components/ScrollerGrid.tsx +1 -1
- package/src/components/ScrollerList.tsx +1 -1
|
@@ -93,7 +93,7 @@ export type GridLoader<T extends object, P extends GridJsonData = GridLoadDataPr
|
|
|
93
93
|
* @param rows Rows
|
|
94
94
|
* @param state State
|
|
95
95
|
*/
|
|
96
|
-
onUpdateRows?: (rows: T[], state: GridLoaderStates<T
|
|
96
|
+
onUpdateRows?: (rows: T[], state: GridLoaderStates<T>, reset: boolean) => void;
|
|
97
97
|
/**
|
|
98
98
|
* Threshold at which to pre-fetch data; default is half of loadBatchSize
|
|
99
99
|
*/
|
|
@@ -30,8 +30,7 @@ const ScrollerGrid = (props) => {
|
|
|
30
30
|
const setRows = (rows, reset = false) => {
|
|
31
31
|
stateRefs.current.loadedItems = rows.length;
|
|
32
32
|
updateRows(rows);
|
|
33
|
-
|
|
34
|
-
onUpdateRows(rows, stateRefs.current);
|
|
33
|
+
onUpdateRows?.(rows, stateRefs.current, reset);
|
|
35
34
|
};
|
|
36
35
|
// State Refs
|
|
37
36
|
const stateRefs = react_1.default.useRef({
|
|
@@ -37,8 +37,7 @@ const ScrollerList = (props) => {
|
|
|
37
37
|
const setRows = (rows, reset = false) => {
|
|
38
38
|
stateRefs.current.loadedItems = rows.length;
|
|
39
39
|
updateRows(rows);
|
|
40
|
-
|
|
41
|
-
onUpdateRows(rows, stateRefs.current);
|
|
40
|
+
onUpdateRows?.(rows, stateRefs.current, reset);
|
|
42
41
|
};
|
|
43
42
|
const batchSize = shared_1.Utils.getResult(loadBatchSize, height);
|
|
44
43
|
const stateRefs = react_1.default.useRef({
|
|
@@ -93,7 +93,7 @@ export type GridLoader<T extends object, P extends GridJsonData = GridLoadDataPr
|
|
|
93
93
|
* @param rows Rows
|
|
94
94
|
* @param state State
|
|
95
95
|
*/
|
|
96
|
-
onUpdateRows?: (rows: T[], state: GridLoaderStates<T
|
|
96
|
+
onUpdateRows?: (rows: T[], state: GridLoaderStates<T>, reset: boolean) => void;
|
|
97
97
|
/**
|
|
98
98
|
* Threshold at which to pre-fetch data; default is half of loadBatchSize
|
|
99
99
|
*/
|
|
@@ -24,8 +24,7 @@ export const ScrollerGrid = (props) => {
|
|
|
24
24
|
const setRows = (rows, reset = false) => {
|
|
25
25
|
stateRefs.current.loadedItems = rows.length;
|
|
26
26
|
updateRows(rows);
|
|
27
|
-
|
|
28
|
-
onUpdateRows(rows, stateRefs.current);
|
|
27
|
+
onUpdateRows?.(rows, stateRefs.current, reset);
|
|
29
28
|
};
|
|
30
29
|
// State Refs
|
|
31
30
|
const stateRefs = React.useRef({
|
|
@@ -31,8 +31,7 @@ export const ScrollerList = (props) => {
|
|
|
31
31
|
const setRows = (rows, reset = false) => {
|
|
32
32
|
stateRefs.current.loadedItems = rows.length;
|
|
33
33
|
updateRows(rows);
|
|
34
|
-
|
|
35
|
-
onUpdateRows(rows, stateRefs.current);
|
|
34
|
+
onUpdateRows?.(rows, stateRefs.current, reset);
|
|
36
35
|
};
|
|
37
36
|
const batchSize = Utils.getResult(loadBatchSize, height);
|
|
38
37
|
const stateRefs = React.useRef({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/react",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.60",
|
|
4
4
|
"description": "TypeScript ReactJs UI Independent Framework",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"react": "^19.2.0",
|
|
45
45
|
"react-dom": "^19.2.0",
|
|
46
46
|
"react-router-dom": "^7.9.4",
|
|
47
|
-
"react-window": "^2.2.
|
|
47
|
+
"react-window": "^2.2.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@babel/cli": "^7.28.3",
|
|
@@ -55,9 +55,9 @@
|
|
|
55
55
|
"@testing-library/jest-dom": "^6.9.1",
|
|
56
56
|
"@testing-library/react": "^16.3.0",
|
|
57
57
|
"@types/react": "^19.2.2",
|
|
58
|
-
"@types/react-dom": "^19.2.
|
|
58
|
+
"@types/react-dom": "^19.2.2",
|
|
59
59
|
"@vitejs/plugin-react": "^5.0.4",
|
|
60
|
-
"jsdom": "^27.0.
|
|
60
|
+
"jsdom": "^27.0.1",
|
|
61
61
|
"typescript": "^5.9.3",
|
|
62
62
|
"vitest": "^3.2.4"
|
|
63
63
|
}
|
|
@@ -146,7 +146,11 @@ export type GridLoader<
|
|
|
146
146
|
* @param rows Rows
|
|
147
147
|
* @param state State
|
|
148
148
|
*/
|
|
149
|
-
onUpdateRows?: (
|
|
149
|
+
onUpdateRows?: (
|
|
150
|
+
rows: T[],
|
|
151
|
+
state: GridLoaderStates<T>,
|
|
152
|
+
reset: boolean
|
|
153
|
+
) => void;
|
|
150
154
|
|
|
151
155
|
/**
|
|
152
156
|
* Threshold at which to pre-fetch data; default is half of loadBatchSize
|
|
@@ -175,7 +175,7 @@ export const ScrollerGrid = <T extends object>(props: ScrollerGridProps<T>) => {
|
|
|
175
175
|
stateRefs.current.loadedItems = rows.length;
|
|
176
176
|
updateRows(rows);
|
|
177
177
|
|
|
178
|
-
|
|
178
|
+
onUpdateRows?.(rows, stateRefs.current, reset);
|
|
179
179
|
};
|
|
180
180
|
|
|
181
181
|
// State Refs
|
|
@@ -118,7 +118,7 @@ export const ScrollerList = <T extends object>(props: ScrollerListProps<T>) => {
|
|
|
118
118
|
stateRefs.current.loadedItems = rows.length;
|
|
119
119
|
updateRows(rows);
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
onUpdateRows?.(rows, stateRefs.current, reset);
|
|
122
122
|
};
|
|
123
123
|
|
|
124
124
|
const batchSize = Utils.getResult<number>(loadBatchSize, height);
|