cecomponent 2.0.86 → 2.0.88
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.
|
@@ -33,12 +33,38 @@ export interface GridContextState {
|
|
|
33
33
|
/** Optional persisted frozen column ids */
|
|
34
34
|
frozenColumnIds?: string[];
|
|
35
35
|
}
|
|
36
|
+
interface SelectedRowsPayload {
|
|
37
|
+
ids: (string | number)[];
|
|
38
|
+
rows?: any[];
|
|
39
|
+
unselectedIds?: (string | number)[];
|
|
40
|
+
unselectedRows?: any[];
|
|
41
|
+
toggledId?: string | number;
|
|
42
|
+
toggledRow?: any;
|
|
43
|
+
toggledChecked?: boolean;
|
|
44
|
+
/** Selected checkbox-column ids by row id (row id stringified as object key). */
|
|
45
|
+
columnCheckboxSelection?: Record<string, string[]>;
|
|
46
|
+
toggledColumnId?: string;
|
|
47
|
+
toggledColumnChecked?: boolean;
|
|
48
|
+
toggledRowId?: string | number;
|
|
49
|
+
}
|
|
36
50
|
interface CEDataGridDynamicTableProps {
|
|
37
51
|
title?: React.ReactNode;
|
|
38
52
|
jsonData: any[];
|
|
39
53
|
columnList?: ColumnConfig[];
|
|
40
54
|
ischeckBoxInGrid?: boolean;
|
|
41
55
|
isSingleSelectionMode?: boolean;
|
|
56
|
+
/** Render checkbox controls inside one or more data columns by column id. */
|
|
57
|
+
renderCheckboxInColumnId?: string | string[];
|
|
58
|
+
/** Callback for checkbox changes inside data columns. */
|
|
59
|
+
onColumnCheckboxChange?: (info: {
|
|
60
|
+
rowIndex: number;
|
|
61
|
+
rowData: any;
|
|
62
|
+
columnId: string;
|
|
63
|
+
checked: boolean;
|
|
64
|
+
selectedColumnIds: string[];
|
|
65
|
+
selectionMap: Record<string, string[]>;
|
|
66
|
+
fullData: any[];
|
|
67
|
+
}) => void;
|
|
42
68
|
isRadioButtonInGrid?: boolean;
|
|
43
69
|
renderRadioInColumnId?: string | string[];
|
|
44
70
|
onRadioChange?: (info: {
|
|
@@ -125,10 +151,7 @@ interface CEDataGridDynamicTableProps {
|
|
|
125
151
|
showPagination?: boolean;
|
|
126
152
|
shouldResetSearchOnDataChange?: boolean;
|
|
127
153
|
pageSizeOptions?: Array<number>;
|
|
128
|
-
handleSelectedRows?: ((rows: any[]) => void) | ((payload:
|
|
129
|
-
ids: (string | number)[];
|
|
130
|
-
rows?: any[];
|
|
131
|
-
}) => void);
|
|
154
|
+
handleSelectedRows?: ((rows: any[]) => void) | ((payload: SelectedRowsPayload) => void);
|
|
132
155
|
/** Field name OR extractor function to use as the stable selection key on each row. Defaults to `id`. */
|
|
133
156
|
selectionKey?: string | ((row: any) => string | number);
|
|
134
157
|
rowsSelected?: Set<number>;
|
package/package.json
CHANGED