@sunggang/ui-lib 0.2.49 → 0.2.51
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/index.esm2.js +8 -2
- package/package.json +1 -1
package/index.esm2.js
CHANGED
|
@@ -20570,6 +20570,8 @@ var DataTable = function(param) {
|
|
|
20570
20570
|
var BasePagination = function(param) {
|
|
20571
20571
|
var table = param.table, total = param.total, handleLastPageClick = param.handleLastPageClick;
|
|
20572
20572
|
var setPageIndex = table.setPageIndex, getCanPreviousPage = table.getCanPreviousPage, getCanNextPage = table.getCanNextPage, getPageCount = table.getPageCount, previousPage = table.previousPage, nextPage = table.nextPage, getState = table.getState;
|
|
20573
|
+
console.log("nextPage:", nextPage);
|
|
20574
|
+
console.log("能否下一頁:", getCanNextPage());
|
|
20573
20575
|
return /*#__PURE__*/ jsxs("div", {
|
|
20574
20576
|
className: "flex items-center flex-wrap",
|
|
20575
20577
|
children: [
|
|
@@ -20645,7 +20647,11 @@ var BasePagination = function(param) {
|
|
|
20645
20647
|
/*#__PURE__*/ jsx("button", {
|
|
20646
20648
|
type: "button",
|
|
20647
20649
|
disabled: !getCanNextPage(),
|
|
20648
|
-
onClick:
|
|
20650
|
+
onClick: function() {
|
|
20651
|
+
setPageIndex(function(old) {
|
|
20652
|
+
return Math.min(old + 1, getPageCount() - 1);
|
|
20653
|
+
});
|
|
20654
|
+
},
|
|
20649
20655
|
children: ">"
|
|
20650
20656
|
}),
|
|
20651
20657
|
/*#__PURE__*/ jsx("button", {
|
|
@@ -20737,7 +20743,7 @@ var BaseTable = function(param) {
|
|
|
20737
20743
|
columnVisibility: columnVisibility,
|
|
20738
20744
|
rowSelection: rowSelection,
|
|
20739
20745
|
pagination: {
|
|
20740
|
-
pageIndex: page,
|
|
20746
|
+
pageIndex: page - 1,
|
|
20741
20747
|
pageSize: limit
|
|
20742
20748
|
}
|
|
20743
20749
|
},
|