@algorithm-shift/design-system 1.2.70 → 1.2.71
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.js +13 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -28392,10 +28392,12 @@ function DataTable({
|
|
|
28392
28392
|
state: {
|
|
28393
28393
|
columnFilters,
|
|
28394
28394
|
columnVisibility,
|
|
28395
|
-
|
|
28396
|
-
|
|
28397
|
-
|
|
28398
|
-
|
|
28395
|
+
...paginationMode === "server" ? {
|
|
28396
|
+
pagination: {
|
|
28397
|
+
pageIndex: controlledPageIndex ?? 0,
|
|
28398
|
+
pageSize
|
|
28399
|
+
}
|
|
28400
|
+
} : {}
|
|
28399
28401
|
},
|
|
28400
28402
|
onColumnFiltersChange: setColumnFilters,
|
|
28401
28403
|
onColumnVisibilityChange: setColumnVisibility,
|
|
@@ -28404,11 +28406,13 @@ function DataTable({
|
|
|
28404
28406
|
getPaginationRowModel: pagination && paginationMode === "client" ? getPaginationRowModel() : void 0,
|
|
28405
28407
|
manualPagination: paginationMode === "server",
|
|
28406
28408
|
pageCount: paginationMode === "server" ? Math.ceil(totalRecords / pageSize) : void 0,
|
|
28407
|
-
|
|
28408
|
-
|
|
28409
|
-
|
|
28410
|
-
|
|
28411
|
-
|
|
28409
|
+
...paginationMode === "server" ? {
|
|
28410
|
+
onPaginationChange: (updater) => {
|
|
28411
|
+
const prev = table.getState().pagination;
|
|
28412
|
+
const next = typeof updater === "function" ? updater(prev) : updater;
|
|
28413
|
+
onPageChange?.(next.pageIndex, next.pageSize);
|
|
28414
|
+
}
|
|
28415
|
+
} : {}
|
|
28412
28416
|
});
|
|
28413
28417
|
const getPageNumbers = (currentPage, totalPages, maxVisiblePages = 5) => {
|
|
28414
28418
|
if (totalPages <= maxVisiblePages) {
|