@moontra/moonui-pro 2.26.32 → 2.26.34
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 +45 -45
- package/dist/index.global.js.map +1 -1
- package/dist/index.mjs +9 -14
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -74027,15 +74027,12 @@ function DataTable({
|
|
|
74027
74027
|
},
|
|
74028
74028
|
cell: ({ row }) => {
|
|
74029
74029
|
const isSelected = row.getIsSelected();
|
|
74030
|
-
const rowId = row.id;
|
|
74031
|
-
console.log(`Row ${rowId}: isSelected=${isSelected}, rowSelection:`, rowSelection);
|
|
74032
74030
|
return /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
74033
74031
|
"input",
|
|
74034
74032
|
{
|
|
74035
74033
|
type: "checkbox",
|
|
74036
74034
|
checked: isSelected,
|
|
74037
74035
|
onChange: (e) => {
|
|
74038
|
-
console.log(`Toggling row ${rowId} to ${e.target.checked}`);
|
|
74039
74036
|
row.toggleSelected(e.target.checked);
|
|
74040
74037
|
},
|
|
74041
74038
|
onClick: (e) => {
|
|
@@ -74074,16 +74071,7 @@ function DataTable({
|
|
|
74074
74071
|
sortDescFirst: false,
|
|
74075
74072
|
// First click should be ascending
|
|
74076
74073
|
onColumnVisibilityChange: setColumnVisibility,
|
|
74077
|
-
onRowSelectionChange:
|
|
74078
|
-
const newSelection = typeof updater === "function" ? updater(rowSelection) : updater;
|
|
74079
|
-
setRowSelection(newSelection);
|
|
74080
|
-
if (onRowSelect && selectable) {
|
|
74081
|
-
setTimeout(() => {
|
|
74082
|
-
const selectedRows = table.getFilteredSelectedRowModel().rows.map((row) => row.original);
|
|
74083
|
-
onRowSelect(selectedRows);
|
|
74084
|
-
}, 0);
|
|
74085
|
-
}
|
|
74086
|
-
},
|
|
74074
|
+
onRowSelectionChange: setRowSelection,
|
|
74087
74075
|
onGlobalFilterChange: setGlobalFilter,
|
|
74088
74076
|
globalFilterFn: "includesString",
|
|
74089
74077
|
enableRowSelection: selectable || enableRowSelection || false,
|
|
@@ -74159,7 +74147,8 @@ function DataTable({
|
|
|
74159
74147
|
sorting: externalState?.sorting ?? sorting,
|
|
74160
74148
|
columnFilters: externalState?.columnFilters ?? columnFilters,
|
|
74161
74149
|
columnVisibility: externalState?.columnVisibility ?? columnVisibility,
|
|
74162
|
-
rowSelection
|
|
74150
|
+
rowSelection,
|
|
74151
|
+
// Always use internal rowSelection state
|
|
74163
74152
|
globalFilter: externalState?.globalFilter ?? globalFilter,
|
|
74164
74153
|
pagination: externalState?.pagination ?? paginationState,
|
|
74165
74154
|
...externalState || {}
|
|
@@ -74178,6 +74167,12 @@ function DataTable({
|
|
|
74178
74167
|
return rowData.id || rowData.orderId || rowData.orderNumber || `row-${index2}`;
|
|
74179
74168
|
}
|
|
74180
74169
|
});
|
|
74170
|
+
t__default.useEffect(() => {
|
|
74171
|
+
if (onRowSelect && selectable) {
|
|
74172
|
+
const selectedRows = table.getFilteredSelectedRowModel().rows.map((row) => row.original);
|
|
74173
|
+
onRowSelect(selectedRows);
|
|
74174
|
+
}
|
|
74175
|
+
}, [rowSelection]);
|
|
74181
74176
|
table.getState();
|
|
74182
74177
|
const rowModel = table.getRowModel();
|
|
74183
74178
|
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.34",
|
|
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",
|
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
"react-dom": ">=18.0.0 || ^19.0.0"
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
|
+
"@moontra/moonui-pro": "^2.26.33",
|
|
84
85
|
"@radix-ui/react-accordion": "^1.2.11",
|
|
85
86
|
"@radix-ui/react-avatar": "^1.1.10",
|
|
86
87
|
"@radix-ui/react-checkbox": "^1.3.2",
|