react-table-edit 1.4.53 → 1.4.55
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/component/edit-form/index.d.ts +1 -1
- package/dist/component/edit-form-inline/index.d.ts +1 -1
- package/dist/component/input/input-date/index.d.ts +1 -1
- package/dist/component/select-table-tree/index.d.ts +1 -1
- package/dist/component/table/cell.d.ts +3 -4
- package/dist/component/table/edit-element.d.ts +1 -0
- package/dist/component/table/key-handlers.d.ts +4 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +233 -84
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +233 -84
- package/dist/index.mjs.map +1 -1
- package/dist/styles/index.css +15 -15
- package/dist/styles/index.css.map +1 -1
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -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
|
-
|
|
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: (
|
|
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>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { KeyboardEvent } from "react";
|
|
2
|
+
import { TFunction } from "react-i18next";
|
|
2
3
|
import { ICellInfo, IColumnTable, IFTableEditPaging } from "../type";
|
|
3
4
|
export interface KeyHandlerParams {
|
|
4
5
|
row: any;
|
|
@@ -10,6 +11,7 @@ export interface KeyHandlerParams {
|
|
|
10
11
|
indexLastEdit: number;
|
|
11
12
|
editDisable?: boolean;
|
|
12
13
|
addDisable?: boolean;
|
|
14
|
+
t: TFunction<"translation", undefined>;
|
|
13
15
|
pagingSetting?: IFTableEditPaging;
|
|
14
16
|
changeDataSource: (data: any[], numberOfRows?: number) => void;
|
|
15
17
|
rowChange?: (row: any, indexRow: number, field: string) => void;
|
|
@@ -20,8 +22,8 @@ export interface KeyHandlerParams {
|
|
|
20
22
|
}
|
|
21
23
|
export declare const handleArrowRight: (e: KeyboardEvent<any>, params: KeyHandlerParams) => void;
|
|
22
24
|
export declare const handleArrowLeft: (e: KeyboardEvent<any>, params: KeyHandlerParams) => void;
|
|
23
|
-
export declare const handleArrowUp: (e: KeyboardEvent<any>, params: KeyHandlerParams) => void
|
|
24
|
-
export declare const handleArrowDown: (e: KeyboardEvent<any>, params: KeyHandlerParams) => void
|
|
25
|
+
export declare const handleArrowUp: (e: KeyboardEvent<any>, params: KeyHandlerParams) => Promise<void>;
|
|
26
|
+
export declare const handleArrowDown: (e: KeyboardEvent<any>, params: KeyHandlerParams) => Promise<void>;
|
|
25
27
|
export declare const handleTab: (e: KeyboardEvent<any>, params: KeyHandlerParams) => void;
|
|
26
28
|
export declare const handleEnter: (e: KeyboardEvent<any>, params: KeyHandlerParams) => void;
|
|
27
29
|
export declare const handleCtrlD: (e: KeyboardEvent<any>, params: KeyHandlerParams) => void;
|
package/dist/index.d.ts
CHANGED