@moontra/moonui-pro 2.25.9 → 2.25.10
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 +78 -78
- package/dist/index.global.js.map +1 -1
- package/dist/index.mjs +18 -4
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -73763,6 +73763,10 @@ function DataTable({
|
|
|
73763
73763
|
const [columnVisibility, setColumnVisibility] = t__default.useState({});
|
|
73764
73764
|
const [rowSelection, setRowSelection] = t__default.useState({});
|
|
73765
73765
|
const [globalFilter, setGlobalFilter] = t__default.useState("");
|
|
73766
|
+
const [paginationState, setPaginationState] = t__default.useState({
|
|
73767
|
+
pageIndex: 0,
|
|
73768
|
+
pageSize: defaultPageSize || pageSize || 10
|
|
73769
|
+
});
|
|
73766
73770
|
const [isPaginationLoading, setIsPaginationLoading] = t__default.useState(false);
|
|
73767
73771
|
const [internalExpandedRows, setInternalExpandedRows] = t__default.useState(/* @__PURE__ */ new Set());
|
|
73768
73772
|
const [filterDrawerOpen, setFilterDrawerOpen] = t__default.useState(false);
|
|
@@ -73792,6 +73796,7 @@ function DataTable({
|
|
|
73792
73796
|
columns,
|
|
73793
73797
|
onSortingChange: onSortingChange !== void 0 ? onSortingChange : setSorting,
|
|
73794
73798
|
onColumnFiltersChange: onColumnFiltersChange !== void 0 ? onColumnFiltersChange : setColumnFilters,
|
|
73799
|
+
onPaginationChange: onPaginationChange !== void 0 ? onPaginationChange : setPaginationState,
|
|
73795
73800
|
getCoreRowModel: getCoreRowModel(),
|
|
73796
73801
|
getPaginationRowModel: getPaginationRowModel(),
|
|
73797
73802
|
getSortedRowModel: getSortedRowModel(),
|
|
@@ -73881,6 +73886,7 @@ function DataTable({
|
|
|
73881
73886
|
columnVisibility: externalState?.columnVisibility ?? columnVisibility,
|
|
73882
73887
|
rowSelection: externalState?.rowSelection ?? rowSelection,
|
|
73883
73888
|
globalFilter: externalState?.globalFilter ?? globalFilter,
|
|
73889
|
+
pagination: externalState?.pagination ?? paginationState,
|
|
73884
73890
|
...externalState || {}
|
|
73885
73891
|
},
|
|
73886
73892
|
initialState: {
|
|
@@ -74110,10 +74116,18 @@ function DataTable({
|
|
|
74110
74116
|
{
|
|
74111
74117
|
value: table.getState().pagination.pageSize,
|
|
74112
74118
|
onChange: async (e) => {
|
|
74113
|
-
|
|
74114
|
-
|
|
74115
|
-
|
|
74116
|
-
|
|
74119
|
+
const newPageSize = Number(e.target.value);
|
|
74120
|
+
if (onPaginationChange) {
|
|
74121
|
+
onPaginationChange({
|
|
74122
|
+
pageIndex: table.getState().pagination.pageIndex,
|
|
74123
|
+
pageSize: newPageSize
|
|
74124
|
+
});
|
|
74125
|
+
} else {
|
|
74126
|
+
setIsPaginationLoading(true);
|
|
74127
|
+
await new Promise((resolve) => setTimeout(resolve, 300));
|
|
74128
|
+
table.setPageSize(newPageSize);
|
|
74129
|
+
setIsPaginationLoading(false);
|
|
74130
|
+
}
|
|
74117
74131
|
},
|
|
74118
74132
|
className: "h-8 w-[70px] rounded border border-input bg-background px-3 py-1 text-sm",
|
|
74119
74133
|
disabled: isPaginationLoading,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "2.25.
|
|
3
|
+
"version": "2.25.10",
|
|
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",
|