@facter/ds-core 1.21.0 → 1.23.0
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.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +9 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1110,7 +1110,8 @@ function useDataTableInternal({
|
|
|
1110
1110
|
columns,
|
|
1111
1111
|
getRowId,
|
|
1112
1112
|
manualPagination = false,
|
|
1113
|
-
pageCount: externalPageCount
|
|
1113
|
+
pageCount: externalPageCount,
|
|
1114
|
+
initialPageSize = 10
|
|
1114
1115
|
}) {
|
|
1115
1116
|
const [rowSelection, setRowSelection] = React10.useState({});
|
|
1116
1117
|
const [columnVisibility, setColumnVisibility] = React10.useState({});
|
|
@@ -1120,7 +1121,7 @@ function useDataTableInternal({
|
|
|
1120
1121
|
const [density, setDensity] = React10.useState("default");
|
|
1121
1122
|
const [pagination, setPagination] = React10.useState({
|
|
1122
1123
|
pageIndex: 0,
|
|
1123
|
-
pageSize:
|
|
1124
|
+
pageSize: initialPageSize
|
|
1124
1125
|
});
|
|
1125
1126
|
const table = useReactTable({
|
|
1126
1127
|
data,
|
|
@@ -1343,6 +1344,7 @@ function DataTableRoot({
|
|
|
1343
1344
|
getRowId,
|
|
1344
1345
|
manualPagination,
|
|
1345
1346
|
pageCount,
|
|
1347
|
+
initialPageSize,
|
|
1346
1348
|
className
|
|
1347
1349
|
}) {
|
|
1348
1350
|
const { table, meta, density, setDensity, pageIndex, pageSize } = useDataTableInternal({
|
|
@@ -1350,7 +1352,8 @@ function DataTableRoot({
|
|
|
1350
1352
|
columns,
|
|
1351
1353
|
getRowId,
|
|
1352
1354
|
manualPagination,
|
|
1353
|
-
pageCount
|
|
1355
|
+
pageCount,
|
|
1356
|
+
initialPageSize
|
|
1354
1357
|
});
|
|
1355
1358
|
return /* @__PURE__ */ jsx(
|
|
1356
1359
|
DataTableProvider,
|
|
@@ -1464,14 +1467,14 @@ function useAutoPageSize(options = {}) {
|
|
|
1464
1467
|
isReady: hasCalculated.current
|
|
1465
1468
|
};
|
|
1466
1469
|
}
|
|
1467
|
-
var Table = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1470
|
+
var Table = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
1468
1471
|
"table",
|
|
1469
1472
|
{
|
|
1470
1473
|
ref,
|
|
1471
1474
|
className: cn("w-full caption-bottom text-sm", className),
|
|
1472
1475
|
...props
|
|
1473
1476
|
}
|
|
1474
|
-
)
|
|
1477
|
+
));
|
|
1475
1478
|
Table.displayName = "Table";
|
|
1476
1479
|
var TableHeader = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
1477
1480
|
TableHeader.displayName = "TableHeader";
|
|
@@ -1783,7 +1786,6 @@ var DataTablePagination = React10.memo(function DataTablePagination2({
|
|
|
1783
1786
|
firstPage,
|
|
1784
1787
|
lastPage
|
|
1785
1788
|
} = paginationHook;
|
|
1786
|
-
console.log("[DataTablePagination] render", { mode, pageIndex, pageSize, externalPageCount, internalPageCount });
|
|
1787
1789
|
const pageCount = mode === "server" && externalPageCount !== void 0 ? externalPageCount : internalPageCount;
|
|
1788
1790
|
const canGoPrevious = pageIndex > 0;
|
|
1789
1791
|
const canGoNext = pageIndex < pageCount - 1;
|
|
@@ -1861,11 +1863,7 @@ var DataTablePagination = React10.memo(function DataTablePagination2({
|
|
|
1861
1863
|
variant: "outline",
|
|
1862
1864
|
size: "icon-sm",
|
|
1863
1865
|
className: "h-8 w-8 p-0",
|
|
1864
|
-
onClick:
|
|
1865
|
-
console.log("[DataTablePagination] nextPage clicked, current pageIndex:", pageIndex);
|
|
1866
|
-
nextPage();
|
|
1867
|
-
console.log("[DataTablePagination] nextPage called");
|
|
1868
|
-
},
|
|
1866
|
+
onClick: nextPage,
|
|
1869
1867
|
disabled: !canGoNext,
|
|
1870
1868
|
"aria-label": "Pr\xF3xima p\xE1gina",
|
|
1871
1869
|
children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
|