@moontra/moonui-pro 2.26.48 → 2.26.49

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
@@ -73991,14 +73991,15 @@ function DataTable({
73991
73991
  };
73992
73992
  };
73993
73993
  const tableRef = t__default.useRef(null);
73994
- const handleRowSelectionChange = t__default.useCallback((newSelection) => {
73994
+ const handleRowSelectionChange = t__default.useCallback((updater) => {
73995
+ const newSelection = typeof updater === "function" ? updater(rowSelection) : updater;
73995
73996
  setRowSelection(newSelection);
73996
73997
  if (onRowSelect && tableRef.current) {
73997
73998
  const selectedRowIds = Object.keys(newSelection).filter((key) => newSelection[key]);
73998
73999
  const selectedRows = tableRef.current.getRowModel().rows.filter((row) => selectedRowIds.includes(row.id)).map((row) => row.original);
73999
74000
  onRowSelect(selectedRows);
74000
74001
  }
74001
- }, [onRowSelect]);
74002
+ }, [rowSelection, onRowSelect]);
74002
74003
  const processedColumns = t__default.useMemo(() => {
74003
74004
  let cols = columns.map((col) => {
74004
74005
  if (!col.id && col.accessorKey) {
@@ -74059,10 +74060,7 @@ function DataTable({
74059
74060
  sortDescFirst: false,
74060
74061
  // First click should be ascending
74061
74062
  onColumnVisibilityChange: setColumnVisibility,
74062
- onRowSelectionChange: (updater) => {
74063
- const newSelection = typeof updater === "function" ? updater(rowSelection) : updater;
74064
- handleRowSelectionChange(newSelection);
74065
- },
74063
+ onRowSelectionChange: handleRowSelectionChange,
74066
74064
  onGlobalFilterChange: setGlobalFilter,
74067
74065
  globalFilterFn: "includesString",
74068
74066
  enableRowSelection: selectable || enableRowSelection || false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moontra/moonui-pro",
3
- "version": "2.26.48",
3
+ "version": "2.26.49",
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",