@sunggang/ui-lib 0.2.49 → 0.2.50

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 +4 -2
  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: [
@@ -20644,7 +20646,7 @@ var BasePagination = function(param) {
20644
20646
  }),
20645
20647
  /*#__PURE__*/ jsx("button", {
20646
20648
  type: "button",
20647
- disabled: !getCanNextPage(),
20649
+ disabled: getState().pagination.pageIndex + 1 >= getPageCount(),
20648
20650
  onClick: nextPage,
20649
20651
  children: ">"
20650
20652
  }),
@@ -20737,7 +20739,7 @@ var BaseTable = function(param) {
20737
20739
  columnVisibility: columnVisibility,
20738
20740
  rowSelection: rowSelection,
20739
20741
  pagination: {
20740
- pageIndex: page,
20742
+ pageIndex: page - 1,
20741
20743
  pageSize: limit
20742
20744
  }
20743
20745
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunggang/ui-lib",
3
- "version": "0.2.49",
3
+ "version": "0.2.50",
4
4
  "dependencies": {
5
5
  "@iconify/react": "^4.1.1",
6
6
  "@material-ui/core": "^4.12.4",