@clayui/pagination-bar
Advanced tools
Comparing version 3.1.6 to 3.1.7
@@ -6,2 +6,8 @@ # Change Log | ||
## [3.1.7](https://github.com/liferay/clay/compare/@clayui/pagination-bar@3.1.6...@clayui/pagination-bar@3.1.7) (2020-07-14) | ||
### Bug Fixes | ||
- **@clayui/pagination-bar:** automatically go to page 1 if active page exceeds delta ([3229087](https://github.com/liferay/clay/commit/3229087)) | ||
## [3.1.6](https://github.com/liferay/clay/compare/@clayui/pagination-bar@3.1.5...@clayui/pagination-bar@3.1.6) (2020-07-07) | ||
@@ -8,0 +14,0 @@ |
@@ -80,2 +80,10 @@ "use strict"; | ||
}); | ||
var totalPages = Math.ceil(totalItems / activeDelta); | ||
_react.default.useEffect(function () { | ||
if (_onPageChange && activePage > totalPages) { | ||
_onPageChange(1); | ||
} | ||
}, [totalPages]); | ||
return /*#__PURE__*/_react.default.createElement(_PaginationBar.default, otherProps, /*#__PURE__*/_react.default.createElement(_PaginationBar.default.DropDown, { | ||
@@ -100,3 +108,3 @@ items: items, | ||
spritemap: spritemap, | ||
totalPages: Math.ceil(totalItems / activeDelta) | ||
totalPages: totalPages | ||
})); | ||
@@ -103,0 +111,0 @@ }; |
{ | ||
"name": "@clayui/pagination-bar", | ||
"version": "3.1.6", | ||
"version": "3.1.7", | ||
"description": "ClayPaginationBar component", | ||
@@ -30,5 +30,5 @@ "license": "BSD-3-Clause", | ||
"@clayui/button": "^3.3.1", | ||
"@clayui/drop-down": "^3.4.5", | ||
"@clayui/drop-down": "^3.4.6", | ||
"@clayui/icon": "^3.0.5", | ||
"@clayui/pagination": "^3.2.2", | ||
"@clayui/pagination": "^3.2.3", | ||
"@clayui/shared": "^3.1.3", | ||
@@ -45,3 +45,3 @@ "classnames": "^2.2.6" | ||
], | ||
"gitHead": "578a373f4e7cef10c2bff36871d2693ee21844f7" | ||
"gitHead": "27253a866a6cbff78cdef20c3641fb7a2634933d" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
31323
572
Updated@clayui/drop-down@^3.4.6
Updated@clayui/pagination@^3.2.3