react-table-edit 1.4.53 → 1.4.54

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.
@@ -13,9 +13,9 @@ type Props = {
13
13
  menuWidth?: number;
14
14
  rowData: any;
15
15
  indexRow: any;
16
- onKeyDown?: any;
17
16
  defaultValues?: any;
18
17
  schema?: InferType<any>;
18
+ onKeyDown?: (e: React.KeyboardEvent<any>) => void | any;
19
19
  onFormOpen?: (rowData: any, itemsField: FromItemsField[], setItemsField: Dispatch<SetStateAction<FromItemsField[]>>) => void;
20
20
  onFormSubmit?: (rowData: any, setValue: UseFormSetValue<any>, getValues: UseFormGetValues<any>, reset: UseFormReset<any>) => void;
21
21
  footerTemplate?: (rowData: any) => JSX.Element;
@@ -20,9 +20,9 @@ type Props = {
20
20
  invalid?: any;
21
21
  rowData: any;
22
22
  indexRow: any;
23
- onKeyDown?: any;
24
23
  defaultValues?: any;
25
24
  schema?: InferType<any>;
25
+ onKeyDown?: (e: React.KeyboardEvent<any>) => void | any;
26
26
  onFormOpen?: (rowData: any, itemsField: FromItemsField[], setItemsField: Dispatch<SetStateAction<FromItemsField[]>>) => void;
27
27
  footerTemplate?: (rowData: any) => JSX.Element;
28
28
  template?: (row: any, indexRow: number) => any;
@@ -1,11 +1,11 @@
1
1
  import { ClipboardEvent } from 'react';
2
2
  interface IFFormInput {
3
3
  id?: string;
4
- onKeyDown?: any;
5
4
  dateFormat: string;
6
5
  onChange: any;
7
6
  className?: string;
8
7
  value: Date;
8
+ onKeyDown?: (e: React.KeyboardEvent<any>) => void | any;
9
9
  onPaste?: (e: ClipboardEvent<HTMLElement>) => void;
10
10
  }
11
11
  declare const DateInput: (props: IFFormInput) => import("react/jsx-runtime").JSX.Element;
@@ -35,7 +35,7 @@ type Props = {
35
35
  width?: number;
36
36
  rowData?: any;
37
37
  value: any;
38
- onKeyDown?: any;
38
+ onKeyDown?: (e: React.KeyboardEvent<any>) => void | any;
39
39
  formatOptionLabel?: any;
40
40
  handleAdd?: any;
41
41
  options: any[];
@@ -1,4 +1,4 @@
1
- import React, { Dispatch, MutableRefObject, SetStateAction } from "react";
1
+ import React, { Dispatch, KeyboardEvent, MutableRefObject, SetStateAction } from "react";
2
2
  import { ICellInfo, IColumnTable } from "../type";
3
3
  interface CellComponentProps {
4
4
  col: IColumnTable;
@@ -45,15 +45,14 @@ interface CellComponentProps {
45
45
  maxCol: number;
46
46
  } | undefined>>;
47
47
  setStartCell: Dispatch<SetStateAction<ICellInfo>>;
48
- setEditCell: Dispatch<SetStateAction<ICellInfo | undefined>>;
48
+ focusEditElementCell: (e: KeyboardEvent<any> | React.MouseEvent<HTMLDivElement, MouseEvent>, row: number, rol: number) => void;
49
49
  rowChange?: (row: any, indexRow: number, field: string) => void;
50
50
  handleDataChange: (row: any, col: IColumnTable, indexRow: number) => void;
51
51
  changeDataSource: (data: any[]) => void;
52
52
  setSelectedRows: (rows: any[]) => void;
53
53
  handleCommandClick: (...args: any[]) => void;
54
- handleFocusCell: (row?: number, col?: number) => void;
55
54
  handleDuplicate: (...args: any[]) => void;
56
- handleKeyDown: (...args: any[]) => void;
55
+ handleKeyDown: (e: React.KeyboardEvent<HTMLDivElement>, row: any) => void;
57
56
  onDuplicate?: (...args: any[]) => void;
58
57
  }
59
58
  declare const CellComponent: React.FC<CellComponentProps>;
@@ -8,6 +8,7 @@ interface RenderEditCellComponentProps {
8
8
  idTable?: string;
9
9
  editDisable?: boolean;
10
10
  formatSetting?: IFTableEditFormat;
11
+ handleKeyDown: (e: React.KeyboardEvent<HTMLDivElement>, row: any) => void;
11
12
  handleDataChange: (row: any, col: IColumnTable, indexRow: number) => void;
12
13
  }
13
14
  declare const RenderEditCellComponent: React.FC<RenderEditCellComponentProps>;
package/dist/index.d.ts CHANGED
@@ -649,7 +649,7 @@ type Props = {
649
649
  width?: number;
650
650
  rowData?: any;
651
651
  value: any;
652
- onKeyDown?: any;
652
+ onKeyDown?: (e: React__default.KeyboardEvent<any>) => void | any;
653
653
  formatOptionLabel?: any;
654
654
  handleAdd?: any;
655
655
  options: any[];