next-recomponents 2.0.26 → 2.0.27

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/dist/index.d.mts CHANGED
@@ -72,7 +72,7 @@ interface TableProps {
72
72
  editableFields?: string[];
73
73
  onSelect?: (data: GridValidRowModel[]) => void;
74
74
  onSave?: (data: GridValidRowModel[]) => void;
75
- onCloseModal?: (data: GridValidRowModel | undefined) => boolean;
75
+ onCloseModal?: (data: GridValidRowModel | undefined) => boolean | Promise<boolean>;
76
76
  buttons?: Record<string, any>;
77
77
  exportName?: string;
78
78
  modal?: React$1.ReactNode;
package/dist/index.d.ts CHANGED
@@ -72,7 +72,7 @@ interface TableProps {
72
72
  editableFields?: string[];
73
73
  onSelect?: (data: GridValidRowModel[]) => void;
74
74
  onSave?: (data: GridValidRowModel[]) => void;
75
- onCloseModal?: (data: GridValidRowModel | undefined) => boolean;
75
+ onCloseModal?: (data: GridValidRowModel | undefined) => boolean | Promise<boolean>;
76
76
  buttons?: Record<string, any>;
77
77
  exportName?: string;
78
78
  modal?: React$1.ReactNode;
package/dist/index.js CHANGED
@@ -35948,8 +35948,8 @@ function IHTable({
35948
35948
  setModalRow(row);
35949
35949
  setOpen(true);
35950
35950
  };
35951
- const handleClose = () => {
35952
- const pass = onCloseModal ? onCloseModal == null ? void 0 : onCloseModal(modalRow) : true;
35951
+ const handleClose = async () => {
35952
+ const pass = onCloseModal ? await (onCloseModal == null ? void 0 : onCloseModal(modalRow)) : true;
35953
35953
  if (!pass) return;
35954
35954
  setOpen(false);
35955
35955
  setModalRow(void 0);
package/dist/index.mjs CHANGED
@@ -35928,8 +35928,8 @@ function IHTable({
35928
35928
  setModalRow(row);
35929
35929
  setOpen(true);
35930
35930
  };
35931
- const handleClose = () => {
35932
- const pass = onCloseModal ? onCloseModal == null ? void 0 : onCloseModal(modalRow) : true;
35931
+ const handleClose = async () => {
35932
+ const pass = onCloseModal ? await (onCloseModal == null ? void 0 : onCloseModal(modalRow)) : true;
35933
35933
  if (!pass) return;
35934
35934
  setOpen(false);
35935
35935
  setModalRow(void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-recomponents",
3
- "version": "2.0.26",
3
+ "version": "2.0.27",
4
4
  "description": "description nueva",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -28,7 +28,9 @@ interface TableProps {
28
28
  editableFields?: string[];
29
29
  onSelect?: (data: GridValidRowModel[]) => void;
30
30
  onSave?: (data: GridValidRowModel[]) => void;
31
- onCloseModal?: (data: GridValidRowModel | undefined) => boolean;
31
+ onCloseModal?: (
32
+ data: GridValidRowModel | undefined,
33
+ ) => boolean | Promise<boolean>;
32
34
  buttons?: Record<string, any>;
33
35
  exportName?: string;
34
36
  modal?: React.ReactNode;
@@ -408,8 +410,8 @@ function IHTable({
408
410
  setModalRow(row);
409
411
  setOpen(true);
410
412
  };
411
- const handleClose = () => {
412
- const pass = onCloseModal ? onCloseModal?.(modalRow) : true;
413
+ const handleClose = async () => {
414
+ const pass = onCloseModal ? await onCloseModal?.(modalRow) : true;
413
415
 
414
416
  if (!pass) return;
415
417
  setOpen(false);