@moontra/moonui-pro 2.26.42 → 2.26.43
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 +10 -9
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -73972,14 +73972,6 @@ function DataTable({
|
|
|
73972
73972
|
const expandedRows = controlledExpandedRows || internalExpandedRows;
|
|
73973
73973
|
const actualPageSize = defaultPageSize || pageSize;
|
|
73974
73974
|
const stableData = t__default.useMemo(() => data, [data]);
|
|
73975
|
-
t__default.useEffect(() => {
|
|
73976
|
-
if (onRowSelect) {
|
|
73977
|
-
const selectedRows = Object.keys(rowSelection).filter((key) => rowSelection[key]).map((index2) => stableData[parseInt(index2)]).filter(Boolean);
|
|
73978
|
-
setTimeout(() => {
|
|
73979
|
-
onRowSelect(selectedRows);
|
|
73980
|
-
}, 0);
|
|
73981
|
-
}
|
|
73982
|
-
}, [rowSelection, stableData, onRowSelect]);
|
|
73983
73975
|
const createSortingHandler = (columnId) => {
|
|
73984
73976
|
return () => {
|
|
73985
73977
|
const currentSorting = externalState?.sorting ?? sorting;
|
|
@@ -74058,7 +74050,16 @@ function DataTable({
|
|
|
74058
74050
|
sortDescFirst: false,
|
|
74059
74051
|
// First click should be ascending
|
|
74060
74052
|
onColumnVisibilityChange: setColumnVisibility,
|
|
74061
|
-
onRowSelectionChange:
|
|
74053
|
+
onRowSelectionChange: (updater) => {
|
|
74054
|
+
const newSelection = typeof updater === "function" ? updater(rowSelection) : updater;
|
|
74055
|
+
setRowSelection(newSelection);
|
|
74056
|
+
if (onRowSelect) {
|
|
74057
|
+
const selectedRows = Object.keys(newSelection).filter((key) => newSelection[key]).map((index2) => stableData[parseInt(index2)]).filter(Boolean);
|
|
74058
|
+
setTimeout(() => {
|
|
74059
|
+
onRowSelect(selectedRows);
|
|
74060
|
+
}, 0);
|
|
74061
|
+
}
|
|
74062
|
+
},
|
|
74062
74063
|
onGlobalFilterChange: setGlobalFilter,
|
|
74063
74064
|
globalFilterFn: "includesString",
|
|
74064
74065
|
enableRowSelection: selectable || enableRowSelection || false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "2.26.
|
|
3
|
+
"version": "2.26.43",
|
|
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",
|