@moontra/moonui-pro 2.26.24 → 2.26.26
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.global.js +73 -73
- package/dist/index.global.js.map +1 -1
- package/dist/index.mjs +14 -9
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -74045,9 +74045,13 @@ function DataTable({
|
|
|
74045
74045
|
sortDescFirst: false,
|
|
74046
74046
|
// First click should be ascending
|
|
74047
74047
|
onColumnVisibilityChange: setColumnVisibility,
|
|
74048
|
-
onRowSelectionChange:
|
|
74048
|
+
onRowSelectionChange: (updater) => {
|
|
74049
|
+
const newSelection = typeof updater === "function" ? updater(rowSelection) : updater;
|
|
74050
|
+
setRowSelection(newSelection);
|
|
74051
|
+
},
|
|
74049
74052
|
onGlobalFilterChange: setGlobalFilter,
|
|
74050
74053
|
globalFilterFn: "includesString",
|
|
74054
|
+
enableRowSelection: selectable || enableRowSelection || false,
|
|
74051
74055
|
filterFns: {
|
|
74052
74056
|
custom: (row, columnId, filterValue) => {
|
|
74053
74057
|
if (Array.isArray(filterValue)) {
|
|
@@ -74134,16 +74138,17 @@ function DataTable({
|
|
|
74134
74138
|
autoResetAll: false,
|
|
74135
74139
|
autoResetPageIndex: false,
|
|
74136
74140
|
autoResetExpanded: false,
|
|
74137
|
-
getRowId: (row) =>
|
|
74141
|
+
getRowId: (row, index2) => {
|
|
74142
|
+
const rowData = row;
|
|
74143
|
+
return rowData.id || rowData.orderId || rowData.orderNumber || `row-${index2}`;
|
|
74144
|
+
}
|
|
74138
74145
|
});
|
|
74139
|
-
const prevRowSelectionRef = t__default.useRef(rowSelection);
|
|
74140
74146
|
t__default.useEffect(() => {
|
|
74141
|
-
if (onRowSelect
|
|
74142
|
-
|
|
74143
|
-
|
|
74144
|
-
|
|
74145
|
-
|
|
74146
|
-
}, [rowSelection, selectable]);
|
|
74147
|
+
if (!onRowSelect || !selectable)
|
|
74148
|
+
return;
|
|
74149
|
+
const selectedRows = table.getFilteredSelectedRowModel().rows.map((row) => row.original);
|
|
74150
|
+
onRowSelect(selectedRows);
|
|
74151
|
+
}, [rowSelection]);
|
|
74147
74152
|
table.getState();
|
|
74148
74153
|
const rowModel = table.getRowModel();
|
|
74149
74154
|
const rowsRef = t__default.useRef(rowModel.rows);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "2.26.
|
|
3
|
+
"version": "2.26.26",
|
|
4
4
|
"description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|