@bsol-oss/react-datatable5 1.0.56 → 1.0.57
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.ts
CHANGED
|
@@ -44,7 +44,7 @@ interface DataTableProps<TData> {
|
|
|
44
44
|
enableRowSelection?: boolean;
|
|
45
45
|
enableMultiRowSelection?: boolean;
|
|
46
46
|
enableSubRowSelection?: boolean;
|
|
47
|
-
onRowSelect?: (
|
|
47
|
+
onRowSelect?: (rowSelectionState: RowSelectionState, data: TData[]) => void;
|
|
48
48
|
columnOrder?: string[];
|
|
49
49
|
columnFilters?: ColumnFiltersState;
|
|
50
50
|
globalFilter?: string;
|
|
@@ -66,7 +66,7 @@ interface DataTableServerProps<TData> {
|
|
|
66
66
|
enableRowSelection?: boolean;
|
|
67
67
|
enableMultiRowSelection?: boolean;
|
|
68
68
|
enableSubRowSelection?: boolean;
|
|
69
|
-
onRowSelect?: (
|
|
69
|
+
onRowSelect?: (rowSelectionState: RowSelectionState, data: TData[]) => void;
|
|
70
70
|
columnOrder?: string[];
|
|
71
71
|
columnFilters?: ColumnFiltersState;
|
|
72
72
|
globalFilter?: string;
|
package/dist/index.js
CHANGED
|
@@ -162,7 +162,7 @@ const DataTable = ({ columns, data, enableRowSelection = true, enableMultiRowSel
|
|
|
162
162
|
setColumnOrder(table.getAllLeafColumns().map((column) => column.id));
|
|
163
163
|
}, []);
|
|
164
164
|
react.useEffect(() => {
|
|
165
|
-
onRowSelect(table.getState().rowSelection);
|
|
165
|
+
onRowSelect(table.getState().rowSelection, data);
|
|
166
166
|
}, [table.getState().rowSelection]);
|
|
167
167
|
return (jsxRuntime.jsx(TableContext.Provider, { value: {
|
|
168
168
|
table: { ...table },
|
|
@@ -294,7 +294,7 @@ const DataTableServer = ({ columns, url, enableRowSelection = true, enableMultiR
|
|
|
294
294
|
setColumnOrder(table.getAllLeafColumns().map((column) => column.id));
|
|
295
295
|
}, []);
|
|
296
296
|
react.useEffect(() => {
|
|
297
|
-
onRowSelect(table.getState().rowSelection);
|
|
297
|
+
onRowSelect(table.getState().rowSelection, data.results);
|
|
298
298
|
}, [table.getState().rowSelection]);
|
|
299
299
|
return (jsxRuntime.jsx(TableContext.Provider, { value: {
|
|
300
300
|
table: { ...table },
|
package/dist/index.mjs
CHANGED
|
@@ -160,7 +160,7 @@ const DataTable = ({ columns, data, enableRowSelection = true, enableMultiRowSel
|
|
|
160
160
|
setColumnOrder(table.getAllLeafColumns().map((column) => column.id));
|
|
161
161
|
}, []);
|
|
162
162
|
useEffect(() => {
|
|
163
|
-
onRowSelect(table.getState().rowSelection);
|
|
163
|
+
onRowSelect(table.getState().rowSelection, data);
|
|
164
164
|
}, [table.getState().rowSelection]);
|
|
165
165
|
return (jsx(TableContext.Provider, { value: {
|
|
166
166
|
table: { ...table },
|
|
@@ -292,7 +292,7 @@ const DataTableServer = ({ columns, url, enableRowSelection = true, enableMultiR
|
|
|
292
292
|
setColumnOrder(table.getAllLeafColumns().map((column) => column.id));
|
|
293
293
|
}, []);
|
|
294
294
|
useEffect(() => {
|
|
295
|
-
onRowSelect(table.getState().rowSelection);
|
|
295
|
+
onRowSelect(table.getState().rowSelection, data.results);
|
|
296
296
|
}, [table.getState().rowSelection]);
|
|
297
297
|
return (jsx(TableContext.Provider, { value: {
|
|
298
298
|
table: { ...table },
|
|
@@ -17,7 +17,7 @@ export interface DataTableProps<TData> {
|
|
|
17
17
|
enableRowSelection?: boolean;
|
|
18
18
|
enableMultiRowSelection?: boolean;
|
|
19
19
|
enableSubRowSelection?: boolean;
|
|
20
|
-
onRowSelect?: (
|
|
20
|
+
onRowSelect?: (rowSelectionState: RowSelectionState, data: TData[]) => void;
|
|
21
21
|
columnOrder?: string[];
|
|
22
22
|
columnFilters?: ColumnFiltersState;
|
|
23
23
|
globalFilter?: string;
|
|
@@ -8,7 +8,7 @@ export interface DataTableServerProps<TData> {
|
|
|
8
8
|
enableRowSelection?: boolean;
|
|
9
9
|
enableMultiRowSelection?: boolean;
|
|
10
10
|
enableSubRowSelection?: boolean;
|
|
11
|
-
onRowSelect?: (
|
|
11
|
+
onRowSelect?: (rowSelectionState: RowSelectionState, data: TData[]) => void;
|
|
12
12
|
columnOrder?: string[];
|
|
13
13
|
columnFilters?: ColumnFiltersState;
|
|
14
14
|
globalFilter?: string;
|