@reykjavik/hanna-react 0.10.106 → 0.10.107

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 CHANGED
@@ -4,6 +4,12 @@
4
4
 
5
5
  - ... <!-- Add new lines here. -->
6
6
 
7
+ ## 0.10.107
8
+
9
+ _2023-10-05_
10
+
11
+ - fix: Next and prev links in `Pagination` not working
12
+
7
13
  ## 0.10.105 – 0.10.106
8
14
 
9
15
  _2023-10-04_
package/Pagination.js CHANGED
@@ -76,7 +76,7 @@ exports.Pagination = (0, react_1.memo)((props) => {
76
76
  const btn = getBtnRenderer(props);
77
77
  return (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0, classUtils_1.modifiedClass)('Pagination', null, (wrapperProps || {}).className), "aria-label": props.title || texts.defaultTitle.replace(/\$\{pageCount\}/, `${pageCount}`) }),
78
78
  btn({
79
- page: current,
79
+ page: current + 1,
80
80
  modifier: 'next',
81
81
  label: texts.nextLabel,
82
82
  labelLong: texts.nextLabelLong,
@@ -84,7 +84,7 @@ exports.Pagination = (0, react_1.memo)((props) => {
84
84
  }),
85
85
  ' ',
86
86
  btn({
87
- page: current,
87
+ page: current - 1,
88
88
  modifier: 'prev',
89
89
  label: texts.prevLabel,
90
90
  labelLong: texts.pageLabelLong,
package/esm/Pagination.js CHANGED
@@ -72,7 +72,7 @@ export const Pagination = memo((props) => {
72
72
  const btn = getBtnRenderer(props);
73
73
  return (React.createElement("div", Object.assign({}, wrapperProps, { className: modifiedClass('Pagination', null, (wrapperProps || {}).className), "aria-label": props.title || texts.defaultTitle.replace(/\$\{pageCount\}/, `${pageCount}`) }),
74
74
  btn({
75
- page: current,
75
+ page: current + 1,
76
76
  modifier: 'next',
77
77
  label: texts.nextLabel,
78
78
  labelLong: texts.nextLabelLong,
@@ -80,7 +80,7 @@ export const Pagination = memo((props) => {
80
80
  }),
81
81
  ' ',
82
82
  btn({
83
- page: current,
83
+ page: current - 1,
84
84
  modifier: 'prev',
85
85
  label: texts.prevLabel,
86
86
  labelLong: texts.pageLabelLong,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reykjavik/hanna-react",
3
- "version": "0.10.106",
3
+ "version": "0.10.107",
4
4
  "author": "Reykjavík (http://www.reykjavik.is)",
5
5
  "contributors": [
6
6
  "Hugsmiðjan ehf (http://www.hugsmidjan.is)",