@primer/react 38.46.0 → 38.46.1-rc.41e2a6837
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/CHANGELOG.md +6 -0
- package/dist/Pagination/model.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @primer/react
|
|
2
2
|
|
|
3
|
+
## 38.46.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#8708](https://github.com/primer/react/pull/8708) [`16c41d3`](https://github.com/primer/react/commit/16c41d3e57bb7358d887c613aaeb22aaea3a0d97) Thanks [@vivanvv](https://github.com/vivanvv)! - Pagination: Disable Next for empty results when page numbers are hidden.
|
|
8
|
+
|
|
3
9
|
## 38.46.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/dist/Pagination/model.js
CHANGED
|
@@ -10,11 +10,11 @@ function buildPaginationModel(pageCount, currentPage, showPages, marginPageCount
|
|
|
10
10
|
num: currentPage + 1,
|
|
11
11
|
disabled: currentPage === pageCount
|
|
12
12
|
};
|
|
13
|
-
if (!showPages) return [prev, next];
|
|
14
13
|
if (pageCount <= 0) return [prev, {
|
|
15
14
|
...next,
|
|
16
15
|
disabled: true
|
|
17
16
|
}];
|
|
17
|
+
if (!showPages) return [prev, next];
|
|
18
18
|
const pages = [];
|
|
19
19
|
const standardGap = surroundingPageCount + marginPageCount;
|
|
20
20
|
if (pageCount <= standardGap + standardGap + 3) {
|
package/package.json
CHANGED