@sunggang/ui-lib 0.2.50 → 0.2.52

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.
Files changed (2) hide show
  1. package/index.esm2.js +11 -2
  2. package/package.json +1 -1
package/index.esm2.js CHANGED
@@ -20572,6 +20572,7 @@ var BasePagination = function(param) {
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
20573
  console.log("nextPage:", nextPage);
20574
20574
  console.log("能否下一頁:", getCanNextPage());
20575
+ getState().pagination.pageIndex === getPageCount() - 1;
20575
20576
  return /*#__PURE__*/ jsxs("div", {
20576
20577
  className: "flex items-center flex-wrap",
20577
20578
  children: [
@@ -20646,8 +20647,16 @@ var BasePagination = function(param) {
20646
20647
  }),
20647
20648
  /*#__PURE__*/ jsx("button", {
20648
20649
  type: "button",
20649
- disabled: getState().pagination.pageIndex + 1 >= getPageCount(),
20650
- onClick: nextPage,
20650
+ disabled: !getCanNextPage(),
20651
+ onClick: function() {
20652
+ var nextPageIndex = getState().pagination.pageIndex + 1;
20653
+ var lastPageIndex = getPageCount() - 1;
20654
+ if (nextPageIndex === lastPageIndex && handleLastPageClick) {
20655
+ handleLastPageClick();
20656
+ } else {
20657
+ nextPage();
20658
+ }
20659
+ },
20651
20660
  children: ">"
20652
20661
  }),
20653
20662
  /*#__PURE__*/ jsx("button", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunggang/ui-lib",
3
- "version": "0.2.50",
3
+ "version": "0.2.52",
4
4
  "dependencies": {
5
5
  "@iconify/react": "^4.1.1",
6
6
  "@material-ui/core": "^4.12.4",