@moontra/moonui-pro 2.26.47 → 2.26.48

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
@@ -73990,13 +73990,15 @@ function DataTable({
73990
73990
  }
73991
73991
  };
73992
73992
  };
73993
+ const tableRef = t__default.useRef(null);
73993
73994
  const handleRowSelectionChange = t__default.useCallback((newSelection) => {
73994
73995
  setRowSelection(newSelection);
73995
- if (onRowSelect) {
73996
- const selectedRows = Object.keys(newSelection).filter((key) => newSelection[key]).map((index2) => stableData[parseInt(index2)]).filter(Boolean);
73996
+ if (onRowSelect && tableRef.current) {
73997
+ const selectedRowIds = Object.keys(newSelection).filter((key) => newSelection[key]);
73998
+ const selectedRows = tableRef.current.getRowModel().rows.filter((row) => selectedRowIds.includes(row.id)).map((row) => row.original);
73997
73999
  onRowSelect(selectedRows);
73998
74000
  }
73999
- }, [stableData, onRowSelect]);
74001
+ }, [onRowSelect]);
74000
74002
  const processedColumns = t__default.useMemo(() => {
74001
74003
  let cols = columns.map((col) => {
74002
74004
  if (!col.id && col.accessorKey) {
@@ -74164,6 +74166,7 @@ function DataTable({
74164
74166
  return String(index2);
74165
74167
  }
74166
74168
  });
74169
+ tableRef.current = table;
74167
74170
  table.getState();
74168
74171
  const rowModel = table.getRowModel();
74169
74172
  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.47",
3
+ "version": "2.26.48",
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",