@etsoo/react 1.6.58 → 1.6.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.
|
@@ -8,6 +8,11 @@ export type ScrollerGridItemRendererProps<T> = Omit<GridChildComponentProps<T>,
|
|
|
8
8
|
* Selected items
|
|
9
9
|
*/
|
|
10
10
|
selectedItems: T[];
|
|
11
|
+
/**
|
|
12
|
+
* Set items for rerenderer
|
|
13
|
+
* @param callback Callback
|
|
14
|
+
*/
|
|
15
|
+
setItems: (callback: (items: T[]) => T[] | undefined) => void;
|
|
11
16
|
/**
|
|
12
17
|
* Data
|
|
13
18
|
*/
|
|
@@ -93,7 +93,13 @@ export const ScrollerGrid = (props) => {
|
|
|
93
93
|
return itemRenderer({
|
|
94
94
|
...itemProps,
|
|
95
95
|
data,
|
|
96
|
-
selectedItems: state.selectedItems
|
|
96
|
+
selectedItems: state.selectedItems,
|
|
97
|
+
setItems: (callback) => {
|
|
98
|
+
const result = callback(rows);
|
|
99
|
+
if (result == null)
|
|
100
|
+
return;
|
|
101
|
+
setRows(result);
|
|
102
|
+
}
|
|
97
103
|
});
|
|
98
104
|
};
|
|
99
105
|
// Local items renderer callback
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/react",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.60",
|
|
4
4
|
"description": "TypeScript ReactJs UI Independent Framework",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"@emotion/css": "^11.10.6",
|
|
51
51
|
"@emotion/react": "^11.10.6",
|
|
52
52
|
"@emotion/styled": "^11.10.6",
|
|
53
|
-
"@etsoo/appscript": "^1.3.
|
|
53
|
+
"@etsoo/appscript": "^1.3.89",
|
|
54
54
|
"@etsoo/notificationbase": "^1.1.24",
|
|
55
|
-
"@etsoo/shared": "^1.1.
|
|
56
|
-
"@types/react": "^18.0.
|
|
55
|
+
"@etsoo/shared": "^1.1.99",
|
|
56
|
+
"@types/react": "^18.0.33",
|
|
57
57
|
"@types/react-dom": "^18.0.11",
|
|
58
58
|
"@types/react-window": "^1.8.5",
|
|
59
59
|
"react": "^18.2.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@types/jest": "^29.5.0",
|
|
73
73
|
"jest": "^29.5.0",
|
|
74
74
|
"jest-environment-jsdom": "^29.5.0",
|
|
75
|
-
"ts-jest": "^29.0
|
|
76
|
-
"typescript": "^5.0.
|
|
75
|
+
"ts-jest": "^29.1.0",
|
|
76
|
+
"typescript": "^5.0.4"
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -19,6 +19,12 @@ export type ScrollerGridItemRendererProps<T> = Omit<
|
|
|
19
19
|
*/
|
|
20
20
|
selectedItems: T[];
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* Set items for rerenderer
|
|
24
|
+
* @param callback Callback
|
|
25
|
+
*/
|
|
26
|
+
setItems: (callback: (items: T[]) => T[] | undefined) => void;
|
|
27
|
+
|
|
22
28
|
/**
|
|
23
29
|
* Data
|
|
24
30
|
*/
|
|
@@ -278,7 +284,12 @@ export const ScrollerGrid = <
|
|
|
278
284
|
return itemRenderer({
|
|
279
285
|
...itemProps,
|
|
280
286
|
data,
|
|
281
|
-
selectedItems: state.selectedItems
|
|
287
|
+
selectedItems: state.selectedItems,
|
|
288
|
+
setItems: (callback: (items: T[]) => T[] | undefined) => {
|
|
289
|
+
const result = callback(rows);
|
|
290
|
+
if (result == null) return;
|
|
291
|
+
setRows(result);
|
|
292
|
+
}
|
|
282
293
|
});
|
|
283
294
|
};
|
|
284
295
|
|