@moontra/moonui-pro 2.26.32 → 2.26.33

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.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: (updater) => {
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,
@@ -74178,6 +74166,12 @@ function DataTable({
74178
74166
  return rowData.id || rowData.orderId || rowData.orderNumber || `row-${index2}`;
74179
74167
  }
74180
74168
  });
74169
+ t__default.useEffect(() => {
74170
+ if (onRowSelect && selectable) {
74171
+ const selectedRows = table.getFilteredSelectedRowModel().rows.map((row) => row.original);
74172
+ onRowSelect(selectedRows);
74173
+ }
74174
+ }, [rowSelection]);
74181
74175
  table.getState();
74182
74176
  const rowModel = table.getRowModel();
74183
74177
  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.32",
3
+ "version": "2.26.33",
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",