@bsol-oss/react-datatable5 1.0.55 → 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 },
|
|
@@ -717,7 +717,7 @@ const TableCards = ({ isSelectable = false }) => {
|
|
|
717
717
|
disabled: !row.getCanSelect(),
|
|
718
718
|
// indeterminate: row.getIsSomeSelected(),
|
|
719
719
|
onChange: row.getToggleSelectedHandler() })), row.getVisibleCells().map((cell) => {
|
|
720
|
-
return (jsxRuntime.jsx(react$1.Box, { children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }));
|
|
720
|
+
return (jsxRuntime.jsx(react$1.Box, { children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }, crypto.randomUUID()));
|
|
721
721
|
})] }) }, crypto.randomUUID()));
|
|
722
722
|
}) }));
|
|
723
723
|
};
|
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 },
|
|
@@ -715,7 +715,7 @@ const TableCards = ({ isSelectable = false }) => {
|
|
|
715
715
|
disabled: !row.getCanSelect(),
|
|
716
716
|
// indeterminate: row.getIsSomeSelected(),
|
|
717
717
|
onChange: row.getToggleSelectedHandler() })), row.getVisibleCells().map((cell) => {
|
|
718
|
-
return (jsx(Box, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }));
|
|
718
|
+
return (jsx(Box, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, crypto.randomUUID()));
|
|
719
719
|
})] }) }, crypto.randomUUID()));
|
|
720
720
|
}) }));
|
|
721
721
|
};
|
|
@@ -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;
|