bs-unified-ui 1.0.922 → 1.0.925
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.js +3 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -20487,6 +20487,9 @@ var TablePagination = function (_a) {
|
|
|
20487
20487
|
var pageIdx = Math.max(0, page - pageStart);
|
|
20488
20488
|
var pageVal = pageIdx + pageStart;
|
|
20489
20489
|
var _g = React.useState(pageVal), currentPage = _g[0], setCurrentPage = _g[1];
|
|
20490
|
+
React.useEffect(function () {
|
|
20491
|
+
setCurrentPage(pageVal);
|
|
20492
|
+
}, [pageVal]);
|
|
20490
20493
|
return (React.createElement(material.Box, { sx: { display: 'flex', alignItems: 'center', px: 2 } },
|
|
20491
20494
|
React.createElement(material.Box, { sx: {
|
|
20492
20495
|
'py': 1.5,
|
|
@@ -20510,18 +20513,12 @@ var TablePagination = function (_a) {
|
|
|
20510
20513
|
}, "data-testid": "pagination-".concat(dataTestId) },
|
|
20511
20514
|
React.createElement(Button, { iconOnly: true, variant: 'text', disabled: pageIdx <= 0, onClick: function () {
|
|
20512
20515
|
if (pageIdx) {
|
|
20513
|
-
if (enablePageInput) {
|
|
20514
|
-
setCurrentPage(pageVal - 1);
|
|
20515
|
-
}
|
|
20516
20516
|
onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange(pageVal - 1);
|
|
20517
20517
|
}
|
|
20518
20518
|
}, "data-testid": "btn-pagination-prev-".concat(dataTestId) },
|
|
20519
20519
|
React.createElement(Icon, { name: 'arrow-left-s', size: 20 })),
|
|
20520
20520
|
React.createElement(Button, { iconOnly: true, variant: 'text', disabled: pageIdx >= pageCount - 1, onClick: function () {
|
|
20521
20521
|
if (pageIdx < pageCount - 1) {
|
|
20522
|
-
if (enablePageInput) {
|
|
20523
|
-
setCurrentPage(pageVal + 1);
|
|
20524
|
-
}
|
|
20525
20522
|
onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange(pageVal + 1);
|
|
20526
20523
|
}
|
|
20527
20524
|
}, "data-testid": "btn-pagination-next-".concat(dataTestId) },
|