@moontra/moonui-pro 2.26.31 → 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
@@ -74052,7 +74052,7 @@ function DataTable({
74052
74052
  cols = [checkboxColumn, ...cols];
74053
74053
  }
74054
74054
  return cols;
74055
- }, [columns, selectable, enableRowSelection]);
74055
+ }, [columns, selectable, enableRowSelection, rowSelection]);
74056
74056
  const table = useReactTable({
74057
74057
  data: stableData,
74058
74058
  columns: processedColumns,
@@ -74071,16 +74071,7 @@ function DataTable({
74071
74071
  sortDescFirst: false,
74072
74072
  // First click should be ascending
74073
74073
  onColumnVisibilityChange: setColumnVisibility,
74074
- onRowSelectionChange: (updater) => {
74075
- const newSelection = typeof updater === "function" ? updater(rowSelection) : updater;
74076
- setRowSelection(newSelection);
74077
- if (onRowSelect && selectable) {
74078
- setTimeout(() => {
74079
- const selectedRows = table.getFilteredSelectedRowModel().rows.map((row) => row.original);
74080
- onRowSelect(selectedRows);
74081
- }, 0);
74082
- }
74083
- },
74074
+ onRowSelectionChange: setRowSelection,
74084
74075
  onGlobalFilterChange: setGlobalFilter,
74085
74076
  globalFilterFn: "includesString",
74086
74077
  enableRowSelection: selectable || enableRowSelection || false,
@@ -74175,6 +74166,12 @@ function DataTable({
74175
74166
  return rowData.id || rowData.orderId || rowData.orderNumber || `row-${index2}`;
74176
74167
  }
74177
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]);
74178
74175
  table.getState();
74179
74176
  const rowModel = table.getRowModel();
74180
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.31",
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",