@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.
@@ -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) {
@@ -134,6 +134,9 @@ const ScrollerList = (props) => {
134
134
  };
135
135
  react_1.default.useImperativeHandle(mRef, () => {
136
136
  return {
137
+ get element() {
138
+ return localRef.current?.element;
139
+ },
137
140
  delete(index) {
138
141
  const item = rows.at(index);
139
142
  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) {
@@ -128,6 +128,9 @@ export const ScrollerList = (props) => {
128
128
  };
129
129
  React.useImperativeHandle(mRef, () => {
130
130
  return {
131
+ get element() {
132
+ return localRef.current?.element;
133
+ },
131
134
  delete(index) {
132
135
  const item = rows.at(index);
133
136
  if (item) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/react",
3
- "version": "1.8.57",
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.1.1",
45
- "react-dom": "^19.1.1",
44
+ "react": "^19.2.0",
45
+ "react-dom": "^19.2.0",
46
46
  "react-router-dom": "^7.9.3",
47
- "react-window": "^2.1.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.0",
55
+ "@testing-library/jest-dom": "^6.9.1",
56
56
  "@testing-library/react": "^16.3.0",
57
- "@types/react": "^19.1.16",
58
- "@types/react-dom": "^19.1.9",
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.2",
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) {
@@ -235,6 +235,9 @@ export const ScrollerList = <T extends object>(props: ScrollerListProps<T>) => {
235
235
  mRef,
236
236
  () => {
237
237
  return {
238
+ get element() {
239
+ return localRef.current?.element;
240
+ },
238
241
  delete(index) {
239
242
  const item = rows.at(index);
240
243
  if (item) {