@etsoo/react 1.8.57 → 1.8.58
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/GridMethodRef.d.ts +5 -0
- package/lib/cjs/components/ScrollerGrid.js +3 -0
- package/lib/cjs/components/ScrollerList.js +3 -0
- package/lib/mjs/components/GridMethodRef.d.ts +5 -0
- package/lib/mjs/components/ScrollerGrid.js +3 -0
- package/lib/mjs/components/ScrollerList.js +3 -0
- package/package.json +8 -8
- package/src/components/GridMethodRef.ts +6 -0
- package/src/components/ScrollerGrid.tsx +3 -0
- package/src/components/ScrollerList.tsx +3 -0
|
@@ -8,6 +8,11 @@ export type ScrollToRowParam = Parameters<ListImperativeAPI["scrollToRow"]>[0];
|
|
|
8
8
|
* Grid method ref
|
|
9
9
|
*/
|
|
10
10
|
export interface GridMethodRef<T> {
|
|
11
|
+
/**
|
|
12
|
+
* Get the element
|
|
13
|
+
* @returns Element
|
|
14
|
+
*/
|
|
15
|
+
get element(): HTMLElement | null | undefined;
|
|
11
16
|
/**
|
|
12
17
|
* Delete item at the index
|
|
13
18
|
* @param index Index
|
|
@@ -128,6 +128,9 @@ const ScrollerGrid = (props) => {
|
|
|
128
128
|
setRows(items, true);
|
|
129
129
|
};
|
|
130
130
|
react_1.default.useImperativeHandle(mRef, () => ({
|
|
131
|
+
get element() {
|
|
132
|
+
return localRef.current?.element;
|
|
133
|
+
},
|
|
131
134
|
delete(index) {
|
|
132
135
|
const item = rows.at(index);
|
|
133
136
|
if (item) {
|
|
@@ -8,6 +8,11 @@ export type ScrollToRowParam = Parameters<ListImperativeAPI["scrollToRow"]>[0];
|
|
|
8
8
|
* Grid method ref
|
|
9
9
|
*/
|
|
10
10
|
export interface GridMethodRef<T> {
|
|
11
|
+
/**
|
|
12
|
+
* Get the element
|
|
13
|
+
* @returns Element
|
|
14
|
+
*/
|
|
15
|
+
get element(): HTMLElement | null | undefined;
|
|
11
16
|
/**
|
|
12
17
|
* Delete item at the index
|
|
13
18
|
* @param index Index
|
|
@@ -122,6 +122,9 @@ export const ScrollerGrid = (props) => {
|
|
|
122
122
|
setRows(items, true);
|
|
123
123
|
};
|
|
124
124
|
React.useImperativeHandle(mRef, () => ({
|
|
125
|
+
get element() {
|
|
126
|
+
return localRef.current?.element;
|
|
127
|
+
},
|
|
125
128
|
delete(index) {
|
|
126
129
|
const item = rows.at(index);
|
|
127
130
|
if (item) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/react",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.58",
|
|
4
4
|
"description": "TypeScript ReactJs UI Independent Framework",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"@etsoo/appscript": "^1.6.45",
|
|
42
42
|
"@etsoo/notificationbase": "^1.1.64",
|
|
43
43
|
"@etsoo/shared": "^1.2.76",
|
|
44
|
-
"react": "^19.
|
|
45
|
-
"react-dom": "^19.
|
|
44
|
+
"react": "^19.2.0",
|
|
45
|
+
"react-dom": "^19.2.0",
|
|
46
46
|
"react-router-dom": "^7.9.3",
|
|
47
|
-
"react-window": "^2.
|
|
47
|
+
"react-window": "^2.2.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@babel/cli": "^7.28.3",
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"@babel/plugin-transform-runtime": "^7.28.3",
|
|
53
53
|
"@babel/preset-env": "^7.28.3",
|
|
54
54
|
"@babel/runtime-corejs3": "^7.28.4",
|
|
55
|
-
"@testing-library/jest-dom": "^6.9.
|
|
55
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
56
56
|
"@testing-library/react": "^16.3.0",
|
|
57
|
-
"@types/react": "^19.
|
|
58
|
-
"@types/react-dom": "^19.1
|
|
57
|
+
"@types/react": "^19.2.2",
|
|
58
|
+
"@types/react-dom": "^19.2.1",
|
|
59
59
|
"@types/react-window": "^2.0.0",
|
|
60
60
|
"@vitejs/plugin-react": "^5.0.4",
|
|
61
61
|
"jsdom": "^27.0.0",
|
|
62
|
-
"typescript": "^5.9.
|
|
62
|
+
"typescript": "^5.9.3",
|
|
63
63
|
"vitest": "^3.2.4"
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -10,6 +10,12 @@ export type ScrollToRowParam = Parameters<ListImperativeAPI["scrollToRow"]>[0];
|
|
|
10
10
|
* Grid method ref
|
|
11
11
|
*/
|
|
12
12
|
export interface GridMethodRef<T> {
|
|
13
|
+
/**
|
|
14
|
+
* Get the element
|
|
15
|
+
* @returns Element
|
|
16
|
+
*/
|
|
17
|
+
get element(): HTMLElement | null | undefined;
|
|
18
|
+
|
|
13
19
|
/**
|
|
14
20
|
* Delete item at the index
|
|
15
21
|
* @param index Index
|
|
@@ -292,6 +292,9 @@ export const ScrollerGrid = <T extends object>(props: ScrollerGridProps<T>) => {
|
|
|
292
292
|
React.useImperativeHandle(
|
|
293
293
|
mRef,
|
|
294
294
|
() => ({
|
|
295
|
+
get element() {
|
|
296
|
+
return localRef.current?.element;
|
|
297
|
+
},
|
|
295
298
|
delete(index) {
|
|
296
299
|
const item = rows.at(index);
|
|
297
300
|
if (item) {
|