@moontra/moonui-pro 2.26.21 → 2.26.22
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 +54 -54
- package/dist/index.global.js.map +1 -1
- package/dist/index.mjs +30 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -73991,13 +73991,41 @@ function DataTable({
|
|
|
73991
73991
|
};
|
|
73992
73992
|
};
|
|
73993
73993
|
const processedColumns = t__default.useMemo(() => {
|
|
73994
|
-
|
|
73994
|
+
let cols = columns.map((col) => {
|
|
73995
73995
|
if (!col.id && col.accessorKey) {
|
|
73996
73996
|
return { ...col, id: col.accessorKey };
|
|
73997
73997
|
}
|
|
73998
73998
|
return col;
|
|
73999
73999
|
});
|
|
74000
|
-
|
|
74000
|
+
if (selectable || enableRowSelection) {
|
|
74001
|
+
const checkboxColumn = {
|
|
74002
|
+
id: "select",
|
|
74003
|
+
header: ({ table: table2 }) => /* @__PURE__ */ jsx(
|
|
74004
|
+
"input",
|
|
74005
|
+
{
|
|
74006
|
+
type: "checkbox",
|
|
74007
|
+
checked: table2.getIsAllPageRowsSelected(),
|
|
74008
|
+
onChange: (e) => table2.toggleAllPageRowsSelected(e.target.checked),
|
|
74009
|
+
className: "h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"
|
|
74010
|
+
}
|
|
74011
|
+
),
|
|
74012
|
+
cell: ({ row }) => /* @__PURE__ */ jsx(
|
|
74013
|
+
"input",
|
|
74014
|
+
{
|
|
74015
|
+
type: "checkbox",
|
|
74016
|
+
checked: row.getIsSelected(),
|
|
74017
|
+
onChange: (e) => row.toggleSelected(e.target.checked),
|
|
74018
|
+
className: "h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"
|
|
74019
|
+
}
|
|
74020
|
+
),
|
|
74021
|
+
enableSorting: false,
|
|
74022
|
+
enableHiding: false,
|
|
74023
|
+
size: 32
|
|
74024
|
+
};
|
|
74025
|
+
cols = [checkboxColumn, ...cols];
|
|
74026
|
+
}
|
|
74027
|
+
return cols;
|
|
74028
|
+
}, [columns, selectable, enableRowSelection]);
|
|
74001
74029
|
const table = useReactTable({
|
|
74002
74030
|
data: stableData,
|
|
74003
74031
|
columns: processedColumns,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "2.26.
|
|
3
|
+
"version": "2.26.22",
|
|
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",
|