@facter/ds-core 1.7.4 → 1.7.5
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 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1120,6 +1120,7 @@ function useDataTableInternal({
|
|
|
1120
1120
|
pageIndex: 0,
|
|
1121
1121
|
pageSize: 10
|
|
1122
1122
|
});
|
|
1123
|
+
console.log("[useDataTableInternal] pagination state", pagination);
|
|
1123
1124
|
const table = useReactTable({
|
|
1124
1125
|
data,
|
|
1125
1126
|
columns,
|
|
@@ -1199,7 +1200,10 @@ function DataTableProvider({
|
|
|
1199
1200
|
[density, setDensity]
|
|
1200
1201
|
);
|
|
1201
1202
|
const paginationValue = React49.useMemo(
|
|
1202
|
-
() =>
|
|
1203
|
+
() => {
|
|
1204
|
+
console.log("[DataTableProvider] creating paginationValue", { pageIndex, pageSize });
|
|
1205
|
+
return { pageIndex, pageSize };
|
|
1206
|
+
},
|
|
1203
1207
|
[pageIndex, pageSize]
|
|
1204
1208
|
);
|
|
1205
1209
|
const tableValue = table;
|
|
@@ -1616,6 +1620,7 @@ var DataTablePagination = React49.memo(function DataTablePagination2({
|
|
|
1616
1620
|
}) {
|
|
1617
1621
|
useDataTable();
|
|
1618
1622
|
const { selectedRowCount, totalRows } = useDataTableMeta();
|
|
1623
|
+
const paginationHook = useDataTablePagination();
|
|
1619
1624
|
const {
|
|
1620
1625
|
pageIndex,
|
|
1621
1626
|
pageSize,
|
|
@@ -1628,7 +1633,8 @@ var DataTablePagination = React49.memo(function DataTablePagination2({
|
|
|
1628
1633
|
nextPage,
|
|
1629
1634
|
firstPage,
|
|
1630
1635
|
lastPage
|
|
1631
|
-
} =
|
|
1636
|
+
} = paginationHook;
|
|
1637
|
+
console.log("[DataTablePagination] render", { mode, pageIndex, pageSize, externalPageCount, internalPageCount });
|
|
1632
1638
|
const pageCount = mode === "server" && externalPageCount !== void 0 ? externalPageCount : internalPageCount;
|
|
1633
1639
|
const canGoPrevious = pageIndex > 0;
|
|
1634
1640
|
const canGoNext = pageIndex < pageCount - 1;
|
|
@@ -1706,7 +1712,11 @@ var DataTablePagination = React49.memo(function DataTablePagination2({
|
|
|
1706
1712
|
variant: "outline",
|
|
1707
1713
|
size: "icon-sm",
|
|
1708
1714
|
className: "h-8 w-8 p-0",
|
|
1709
|
-
onClick:
|
|
1715
|
+
onClick: () => {
|
|
1716
|
+
console.log("[DataTablePagination] nextPage clicked, current pageIndex:", pageIndex);
|
|
1717
|
+
nextPage();
|
|
1718
|
+
console.log("[DataTablePagination] nextPage called");
|
|
1719
|
+
},
|
|
1710
1720
|
disabled: !canGoNext,
|
|
1711
1721
|
"aria-label": "Pr\xF3xima p\xE1gina",
|
|
1712
1722
|
children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
|